Closed Bug 993047 Opened 8 years ago Closed 8 years ago

Support outerizing and addProperty hooks on globals with WebIDL bindings

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file)

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

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

::: dom/base/nsGlobalWindow.cpp
@@ +1941,5 @@
>  }
>  
> +/* static */
> +JSObject*
> +nsGlobalWindow::OuterObject(JSContext* aCx, JS::HandleObject aObj)

JS::Handle<JSObject*>, please (also in the header)

@@ +1943,5 @@
> +/* static */
> +JSObject*
> +nsGlobalWindow::OuterObject(JSContext* aCx, JS::HandleObject aObj)
> +{
> +  nsGlobalWindow *origWin;

Stars to the left, please

@@ +1953,5 @@
> +    // running on a window w/o an outer, which means this hook should
> +    // never be called when we have no outer. But just in case, return
> +    // null to prevent leaking an inner window to code in a different
> +    // window.
> +    NS_WARNING("nsGlobalWindow::OuterObject shouldn't fail!");

Perhaps this should say more about the reason it did fail.
Comment on attachment 8402813 [details] [diff] [review]
v1

>+            (not desc.workers or
>+             not desc.interface.getExtendedAttribute("Global")))

So this is really saying "not a worker global", right?  Does it make sense to write that as:

            not (desc.workers and desc.interface.getExtendedAttribute("Global")))

?

r=me with that
Attachment #8402813 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/f6b0e518f6d2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.