Closed Bug 1497658 Opened 2 years ago Closed 2 years ago

Stop using GetCurrentJSContext in nsGlobalWindowOuter

Categories

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

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

No description provided.
We want to just use the subject principal URI.  In practice, all our callers
are script anyway, it turns out...
Attachment #9015671 - Flags: review?(continuation)
We're always called from script, so just pass through the JSContext.
Attachment #9015672 - Flags: review?(continuation)
Attachment #9015671 - Flags: review?(continuation) → review+
Comment on attachment 9015672 [details] [diff] [review]
part  2.  Stop using GetCurrentJSContext in CallerInnerWindow

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

::: dom/base/nsGlobalWindowOuter.h
@@ +807,5 @@
>  
>    inline void MaybeClearInnerWindow(nsGlobalWindowInner* aExpectedInner);
>  
> +  // We need a JSContext to get prototypes inside CallerInnerWindow.
> +  nsGlobalWindowInner *CallerInnerWindow(JSContext* aCx);

nit: * on the return value should be to the left.
Attachment #9015672 - Flags: review?(continuation) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b635e6611d12
part 1.  Remove a useless GetCurrentJSContext check in MakeScriptDialogTitle.  r=mccr8
https://hg.mozilla.org/integration/mozilla-inbound/rev/296fa4a869ae
part  2.  Stop using GetCurrentJSContext in CallerInnerWindow.  r=mccr8
https://hg.mozilla.org/mozilla-central/rev/b635e6611d12
https://hg.mozilla.org/mozilla-central/rev/296fa4a869ae
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.