Last Comment Bug 742425 - Remove the compartment-entering in WrapNewBindingObject
: Remove the compartment-entering in WrapNewBindingObject
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla15
Assigned To: Boris Zbarsky [:bz] (still a bit busy)
:
:
Mentors:
Depends on:
Blocks: ParisBindings
  Show dependency treegraph
 
Reported: 2012-04-04 10:08 PDT by Boris Zbarsky [:bz] (still a bit busy)
Modified: 2012-04-24 17:59 PDT (History)
2 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Remove the extra compartment-entering code we don't need. (2.71 KB, patch)
2012-04-04 10:19 PDT, Boris Zbarsky [:bz] (still a bit busy)
peterv: review+
Details | Diff | Splinter Review

Description Boris Zbarsky [:bz] (still a bit busy) 2012-04-04 10:08:39 PDT
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.
Comment 1 Boris Zbarsky [:bz] (still a bit busy) 2012-04-04 10:19:42 PDT
Created attachment 612245 [details] [diff] [review]
Remove the extra compartment-entering code we don't need.
Comment 2 Peter Van der Beken [:peterv] 2012-04-18 07:13:22 PDT
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?
Comment 3 Boris Zbarsky [:bz] (still a bit busy) 2012-04-18 07:29:29 PDT
> That'll be true for obj too if we don't use JSPROP_NATIVE_ACCESSORS, right?

Yes.
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2012-04-18 09:14:30 PDT
https://hg.mozilla.org/projects/birch/rev/b6f1af93a4e6

Note You need to log in before you can comment on or make changes to this bug.