Closed Bug 742425 Opened 12 years ago Closed 12 years ago

Remove the compartment-entering in WrapNewBindingObject

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I talked to Blake and jorendorff; the claim is that cx and JS_THIS should always be in the same compartment for a jsnative, and since we pass the JS_THIS as the scope to WrapNewBindingObject, we can just assert that we're in the right compartment.
Whiteboard: [need review]
Comment on attachment 612245 [details] [diff] [review]
Remove the extra compartment-entering code we don't need.

Review of attachment 612245 [details] [diff] [review]:
-----------------------------------------------------------------

(In reply to Boris Zbarsky (:bz) from comment #0)
> the claim is that cx and JS_THIS should
> always be in the same compartment for a jsnative

That'll be true for obj too if we don't use JSPROP_NATIVE_ACCESSORS, right?
Attachment #612245 - Flags: review?(peterv) → review+
> That'll be true for obj too if we don't use JSPROP_NATIVE_ACCESSORS, right?

Yes.
https://hg.mozilla.org/projects/birch/rev/b6f1af93a4e6
Flags: in-testsuite-
Whiteboard: [need review] → [need birch merge]
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/b6f1af93a4e6
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [need birch merge]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: