Closed
Bug 659215
Opened 13 years ago
Closed 13 years ago
Try harder to get a JSContext in PostMessageEvent::Run
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla6
Tracking | Status | |
---|---|---|
firefox5 | --- | unaffected |
firefox6 | --- | fixed |
firefox7 | --- | fixed |
People
(Reporter: khuey, Assigned: khuey)
References
Details
(Keywords: regression, Whiteboard: [qa-])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
khuey
:
review+
jst
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
The patch from Bug 553125 causes a leak and an assertion if we can't get a JSContext from the window. It turns out that that can be hit if one calls postMessage on a window that's closed. Our testsuite actually does this.
We should try harder to get a JSContext to use.
Assignee | ||
Updated•13 years ago
|
tracking-firefox6:
? → ---
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #534822 -
Flags: review?(bent.mozilla)
Comment on attachment 534822 [details] [diff] [review]
Patch
Review of attachment 534822 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/nsGlobalWindow.cpp
@@ +5903,5 @@
> + if (cxStack) {
> + rv = cxStack->GetSafeJSContext(&cx);
> + }
> +
> + if (!cxStack || NS_FAILED(rv) || !cx) {
I think you can get away with just checking !cx here, and don't worry about getting a return value from GetSafeJSContext.
Attachment #534822 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 3•13 years ago
|
||
I fixed that, and reverted the now unnecessary nsresult decl changes.
Assignee | ||
Comment 4•13 years ago
|
||
Carrying forward r=bent.
We should take this on Aurora to fix a minor memory leak. Risk here should be low.
Attachment #534822 -
Attachment is obsolete: true
Attachment #534868 -
Flags: review+
Attachment #534868 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 5•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/a2b3d055d1f8
Sadly we can't test this since assertions are not fatal in any test suite that can use window.open.
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Assignee | ||
Updated•13 years ago
|
status-firefox6:
--- → affected
status-firefox7:
--- → fixed
Updated•13 years ago
|
Attachment #534868 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 6•13 years ago
|
||
Target Milestone: mozilla7 → mozilla6
Comment 7•13 years ago
|
||
so is it safe to say that this issue was fixed?
Thanks.
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
•