Closed Bug 1005966 Opened 10 years ago Closed 10 years ago

Add a pref to control whether to use WebIDL bindings for Window

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: peterv, Assigned: peterv)

Details

Attachments

(1 file)

Attached patch v1Splinter Review
      No description provided.
Attachment #8417451 - Flags: review?(bzbarsky)
Comment on attachment 8417451 [details] [diff] [review]
v1

>+    if (!aGlobal || !xpc::InitGlobalObject(aCx, aGlobal, flags)) {

We should document that InitGlobalObject does not expect aCx to be in the compartment of aGlobal and will enter that compartment itself.

>+      if (IsDOMObject(newInnerGlobal)) {

Why not newInnerWindow->IsDOMBinding()?  If there's a reason, it's worth documenting here.

Also, are we in the compartment of newInnerGlobal at this point?

r=me
Attachment #8417451 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky [:bz] from comment #1)
> >+      if (IsDOMObject(newInnerGlobal)) {
> 
> Why not newInnerWindow->IsDOMBinding()?  If there's a reason, it's worth
> documenting here.

No, should be equivalent. Switched to IsDOMBinding.

> Also, are we in the compartment of newInnerGlobal at this point?

We've switched to the outer's compartment that newInnerGlobal is the inner of (there's a |JSAutoCompartment ac(cx, GetWrapperPreserveColor());| just above).
https://hg.mozilla.org/mozilla-central/rev/8a47f2528143
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
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: