Closed
Bug 327564
Opened 19 years ago
Closed 19 years ago
Hang involving E4X (cycle in an XML object?)
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha1
People
(Reporter: jruderman, Assigned: brendan)
References
Details
(4 keywords, Whiteboard: [rft-dl])
Attachments
(2 files)
|
173 bytes,
text/html
|
Details | |
|
2.31 KB,
patch
|
mrbkap
:
review+
shaver
:
superreview+
brendan
:
approval-branch-1.8.1+
dveditz
:
approval1.8.0.2+
|
Details | Diff | Splinter Review |
| Reporter | ||
Comment 1•19 years ago
|
||
| Assignee | ||
Comment 2•19 years ago
|
||
(In bug 312692 comment #6)
> Cycle detection means insuring that the would-be child can't reach the putative
> parent via a path in the DAG. Yes, DAG: we allow
>
> parent = <p/>;
> parent.child = "first";
> child = parent.child[0];
> parent.insertChildBefore(null, child);
>
> to create a DAG with two arcs from parent to child, such that
>
> parent.child[0] === parent.child[1]
Now that ECMA-357 does not copy in appendChild and other insertions, you can end up with duplicate kids as shown here. But if you then clobber parent.child via an assignment that sets a primitive tag content value, you can create a cycle that cannot be detected:
js> p = <p/>
js> p.c = 1
1
js> c = p.c[0]
1
js> p.insertChildBefore(null,c)
<p>
<c>1</c>
<c>1</c>
</p>
js> p.c[1] === c
true
js> p.c = 2
2
js> p
<p>
<c>2</c>
</p>
js> c.appendChild(p)
// iloop here
E4X sucks.
/be
Assignee: general → brendan
Priority: -- → P1
Target Milestone: --- → mozilla1.9alpha
| Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
OS: MacOS X → All
Hardware: Macintosh → All
| Assignee | ||
Comment 3•19 years ago
|
||
Attachment #212234 -
Flags: superreview?(shaver)
Attachment #212234 -
Flags: review?(mrbkap)
Comment 4•19 years ago
|
||
Comment on attachment 212234 [details] [diff] [review]
proposed fix
r=mrbkap
Attachment #212234 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 5•19 years ago
|
||
Fixed on trunk.
/be
Blocks: js1.6rc1
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Flags: blocking1.8.1?
Flags: blocking1.8.0.2?
Resolution: --- → FIXED
| Reporter | ||
Comment 6•19 years ago
|
||
Now I see "Error: cyclic XML value" in my JavaScript console instead of a hang :)
Status: RESOLVED → VERIFIED
Updated•19 years ago
|
Attachment #212234 -
Flags: superreview?(shaver) → superreview+
| Assignee | ||
Updated•19 years ago
|
Attachment #212234 -
Flags: approval1.8.0.2?
Attachment #212234 -
Flags: approval-branch-1.8.1+
Updated•19 years ago
|
Flags: blocking1.8.0.2? → blocking1.8.0.2+
Comment 7•19 years ago
|
||
Comment on attachment 212234 [details] [diff] [review]
proposed fix
approved for 1.8.0 branch, a=dveditz
Attachment #212234 -
Flags: approval1.8.0.2? → approval1.8.0.2+
Comment 9•19 years ago
|
||
Checking in regress-327564.js;
/cvsroot/mozilla/js/tests/e4x/Regress/regress-327564.js,v <-- regress-327564.js
initial revision: 1.1
done
Flags: testcase+
Comment 10•19 years ago
|
||
Marking [rft-dl] (ready for testing in Firefox 1.5.0.2 release candidates) since in-testsuite+ indicates a test case exists in the js test library.
Whiteboard: [rft-dl]
| Assignee | ||
Updated•19 years ago
|
Flags: blocking1.8.1?
You need to log in
before you can comment on or make changes to this bug.
Description
•