Closed
Bug 969156
Opened 12 years ago
Closed 12 years ago
Don't fire onNewGlobalObject until the end of nsGlobalWindow::SetNewDocument
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(1 file, 1 obsolete file)
|
7.25 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
See bug 964545 comment 19. I think I can whip up a quick patch for this.
| Assignee | ||
Comment 1•12 years ago
|
||
Erik, does this solve your problem?
Attachment #8371961 -
Flags: feedback?(evold)
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #2)
> https://tbpl.mozilla.org/?tree=Try&rev=1dadcfddafc0
Oops ignore the above
I'm testing your patch and https://github.com/erikvold/gecko-dev/compare/964545v7 at https://tbpl.mozilla.org/?tree=Try&rev=7b2c43093824
Comment 4•12 years ago
|
||
Comment on attachment 8371961 [details] [diff] [review]
Don't fire onNewGlobalObject until the end of nsGlobalWindow::SetNewDocument. v1
It seems to work \o/ https://tbpl.mozilla.org/?tree=Try&rev=7b2c43093824
Attachment #8371961 -
Flags: feedback?(evold) → feedback+
| Assignee | ||
Comment 5•12 years ago
|
||
Comment on attachment 8371961 [details] [diff] [review]
Don't fire onNewGlobalObject until the end of nsGlobalWindow::SetNewDocument. v1
Great! Flagging Boris for review.
Attachment #8371961 -
Flags: review?(bzbarsky)
Comment 6•12 years ago
|
||
Comment on attachment 8371961 [details] [diff] [review]
Don't fire onNewGlobalObject until the end of nsGlobalWindow::SetNewDocument. v1
So what worries me is sending this notification after DispatchDOMWindowCreated. Wouldn't it be better to do it before people have had a chance to poke at the window?
Do we need to enter the compartment of global before calling JS_FireOnNewGlobalObject?
| Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #6)
> So what worries me is sending this notification after
> DispatchDOMWindowCreated. Wouldn't it be better to do it before people have
> had a chance to poke at the window?
Yeah, that's a good point. I'll fix that.
> Do we need to enter the compartment of global before calling
> JS_FireOnNewGlobalObject?
We're already in the compartment of the outer (which is the compartment of the inner, at this point) a bit further up in the function.
| Assignee | ||
Comment 8•12 years ago
|
||
Attachment #8371961 -
Attachment is obsolete: true
Attachment #8371961 -
Flags: review?(bzbarsky)
Attachment #8372767 -
Flags: review?(bzbarsky)
Comment 9•12 years ago
|
||
Comment on attachment 8372767 [details] [diff] [review]
Don't fire onNewGlobalObject until the end of nsGlobalWindow::SetNewDocument. v2
r=me
Attachment #8372767 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment 12•12 years ago
|
||
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #4)
> Comment on attachment 8371961 [details] [diff] [review]
> Don't fire onNewGlobalObject until the end of
> nsGlobalWindow::SetNewDocument. v1
>
> It seems to work \o/ https://tbpl.mozilla.org/?tree=Try&rev=7b2c43093824
So v1 seemed to work, and v2 seems to not work.
See the try mentioned here: https://bugzilla.mozilla.org/show_bug.cgi?id=964545#c21
Flags: needinfo?(bobbyholley)
| Assignee | ||
Comment 13•12 years ago
|
||
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #12)
> So v1 seemed to work, and v2 seems to not work.
Are you sure? I'd be quite surprised if the failure mode were the same. The problem before was that we were invoking onNewGlobalObject before the new inner window was hooked up to the outer. With this patch, that work has definitely happened. The difference between v1 and v2 is purely the difference between firing onNewGlobalObject before or after DomWindowCreated.
> See the try mentioned here:
> https://bugzilla.mozilla.org/show_bug.cgi?id=964545#c21
That try run appears green to me.
Flags: needinfo?(bobbyholley)
Comment 14•12 years ago
|
||
(In reply to Bobby Holley (:bholley) from comment #13)
> (In reply to Erik Vold [:erikvold] [:ztatic] from comment #12)
> > So v1 seemed to work, and v2 seems to not work.
>
> Are you sure? I'd be quite surprised if the failure mode were the same. The
> problem before was that we were invoking onNewGlobalObject before the new
> inner window was hooked up to the outer. With this patch, that work has
> definitely happened. The difference between v1 and v2 is purely the
> difference between firing onNewGlobalObject before or after DomWindowCreated.
>
> > See the try mentioned here:
> > https://bugzilla.mozilla.org/show_bug.cgi?id=964545#c21
>
> That try run appears green to me.
Hmm I tried again https://bugzilla.mozilla.org/show_bug.cgi?id=964545#c22 and it did work!
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•