Closed
Bug 763856
Opened 12 years ago
Closed 12 years ago
Need way to leave a JSAutoEnterCompartment without waiting for the destructor to be called
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: bholley, Assigned: bholley)
Details
Attachments
(1 file, 3 obsolete files)
1.82 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
This has been annoying me. In general, it's great to use scoping. But sometimes, it unnecessarily complicates the code. For example, sometimes we want to leave the compartment before doing a tail function call. Currently, we have to unnecessarily brace/indent a lot of things to make this happen. Patch coming up.
Assignee | ||
Comment 1•12 years ago
|
||
Attaching a patch, flagging luke for review.
Attachment #632171 -
Flags: review?(luke)
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #632209 -
Flags: review?(mrbkap)
Assignee | ||
Comment 3•12 years ago
|
||
Adding to the mess of the NodePrincipal (et al) check isn't great, but I'm refactoring that in bug 761704.
Attachment #632210 -
Flags: review?(mrbkap)
Assignee | ||
Comment 4•12 years ago
|
||
Added an updated comment to clarify why two JSAutoEnterCompartments are necessary.
Attachment #632209 -
Attachment is obsolete: true
Attachment #632209 -
Flags: review?(mrbkap)
Attachment #632211 -
Flags: review?(mrbkap)
Assignee | ||
Comment 5•12 years ago
|
||
Gah! Wrong bug number for those other patches. Sorry blake. :-(
Assignee | ||
Updated•12 years ago
|
Attachment #632210 -
Attachment is obsolete: true
Attachment #632210 -
Flags: review?(mrbkap)
Assignee | ||
Updated•12 years ago
|
Attachment #632211 -
Attachment is obsolete: true
Attachment #632211 -
Flags: review?(mrbkap)
Assignee | ||
Comment 6•12 years ago
|
||
One thing I realized about this patch is that it allows the consumer to pooch the compartment situation by leaving compartments out of order. I suspect it's not worth worrying about, but maybe we should add some asserts somehow?
Updated•12 years ago
|
Attachment #632171 -
Flags: review?(luke) → review+
Assignee | ||
Comment 7•12 years ago
|
||
Pushed to m-i: http://hg.mozilla.org/integration/mozilla-inbound/rev/f195d6de172f
Target Milestone: --- → mozilla16
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f195d6de172f
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•