Closed
Bug 664250
Opened 14 years ago
Closed 10 years ago
Remove JSCLASS_FREEZE_{PROTO,CTOR}
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 924720
Tracking | Status | |
---|---|---|
blocking2.0 | --- | beta7+ |
People
(Reporter: brendan, Assigned: gal)
References
Details
Attachments
(1 file)
(deleted),
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
See blocked bug. This should have been a one-off freeze call in jsiter.cpp. We should try to "GC" other JSCLASS_* flags too.
A further work item is to avoid freezing StopIteration just so we can share it among a compartment's globals, but that item requires some new API proposed for ES.next. Separate bug to be filed...
Andreas, can you take this one?
/be
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: general → gal
Assignee | ||
Comment 2•14 years ago
|
||
StopIteration is not wrapped when it crosses a membrane. Instead we translate the origin compartment's StopIteration object into the current global's StopIteration object. This is necessary because we inspect the StopIteration object's identity in various places and a wrapped StopIteration object has its own identity and we don't want to unwrap all over the engine. If we freeze the proto and ctor (which is the object really used when throwing StopIteration), we avoid strange behavior such as this one:
compartment A:
StopIteration.x
throw StopIteration
compartment B:
catch (e) {
alert(e.x); // x is not present, since this is a different global's StopIteration
}
I think we can live with this and just remove the freezing code.
Assignee | ||
Updated•14 years ago
|
Attachment #539287 -
Flags: review?(mrbkap)
Comment 3•14 years ago
|
||
Compartment per global would address a bit of the last few comments' concerns!
Updated•14 years ago
|
Attachment #539287 -
Flags: review?(mrbkap) → review+
Comment 4•10 years ago
|
||
efaust landed an equivalent patch for bug 924720:
https://hg.mozilla.org/mozilla-central/rev/32aeb054f757
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•