Closed
Bug 932309
Opened 11 years ago
Closed 11 years ago
Don't null out mDoc in nsGlobalWindow::FreeInnerObjects
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: peterv, Assigned: peterv)
References
Details
Attachments
(4 files)
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
If we stop using a permanent window.document property by instead relying on WebIDL for that we need to stop nulling out mDoc in nsGlobalWindow::FreeInnerObjects because otherwise window.document becomes null. Turns out we rely on mDoc being null to avoid firing certain events in nsGlobalWindow. I've fixed that by doing a check for "is current inner window" instead. I though about doing the check in a more central place like DispatchEvent, but then the callers would still be doing a bunch of work (creating events etc) for all non-current inner windows, just to throw it all away again. So I've opted to assert in DispatchEvent instead. Let me know how you feel about that.
Attachment #824019 -
Flags: review?(bugs)
Assignee | ||
Comment 1•11 years ago
|
||
The GamepadServiceTest fix is just to avoid a crash when running some of the gamepad tests on their own, which happened while I was debugging this patch.
Updated•11 years ago
|
Attachment #824019 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #825986 -
Flags: review?(bugs)
Comment 5•11 years ago
|
||
Comment on attachment 825986 [details] [diff] [review]
Additional fixes v1
> #ifdef MOZ_B2G
> if (!nsCRT::strcmp(aTopic, NS_NETWORK_ACTIVITY_BLIP_UPLOAD_TOPIC) ||
> !nsCRT::strcmp(aTopic, NS_NETWORK_ACTIVITY_BLIP_DOWNLOAD_TOPIC)) {
>+ if (!IsInnerWindow() || !IsCurrentInnerWindow()) {
>+ return NS_OK;
>+ }
MOZ_ASSERT(IsInnerWindow());
if (!IsCurrentInnerWindow()) {
return NS_OK;
}
Attachment #825986 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Backed out for making Linux32 opt mochitest-bc perma-orange.
https://hg.mozilla.org/integration/mozilla-inbound/rev/08d4847dfd5c
https://tbpl.mozilla.org/php/getParsedLog.php?id=30087228&tree=Mozilla-Inbound
Assignee | ||
Comment 8•11 years ago
|
||
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e30f630191b9
https://hg.mozilla.org/mozilla-central/rev/d4fdcf5f3c04
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Comment 10•11 years ago
|
||
Attachment #828313 -
Flags: review?(anygregor)
Comment 11•11 years ago
|
||
Comment on attachment 828313 [details] [diff] [review]
better debug message
Review of attachment 828313 [details] [diff] [review]:
-----------------------------------------------------------------
I don't know why, but this gives us a stack as well.
Attachment #828313 -
Flags: review?(anygregor) → review+
Comment 12•11 years ago
|
||
I need to null check event.
Comment 13•11 years ago
|
||
The method throws if null is passed.
Comment 14•11 years ago
|
||
Peter, how reasonable is it to backport this to beta 27? The fix for bug 936056 basically depends on this patch...
tracking-firefox27:
--- → ?
Flags: needinfo?(peterv)
Assignee | ||
Comment 15•11 years ago
|
||
Bz is going to try to backport bug 936056 to branch without this fix, because it's a bit scary to backport this one.
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•