Closed
Bug 1207368
Opened 9 years ago
Closed 9 years ago
Intermittent test_bug429954.xul | application crashed [@ nsScriptErrorWithStack::AddRef()]
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: KWierso, Assigned: mccr8)
References
(Blocks 1 open bug)
Details
(Keywords: intermittent-failure)
Attachments
(1 file)
2.48 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Updated•9 years ago
|
Component: Widget → XPCOM
Assignee | ||
Comment 2•9 years ago
|
||
See bug 1210747 for an explanation.
Assignee | ||
Comment 3•9 years ago
|
||
Using forget() to extract mMessage from MessageElement ends up going from nsCOMPtr<T> to already_AddRefed<T> to nsCOMPtr<T>. For the second step, the compiler can't tell that the already_AddRefed<T> came from a canonical nsCOMPtr, so it calls Assert_NoQueryNeeded() in debug builds. This in turn causes a QI, which does an AddRef. That is bad because we're not on the main thread, and mMessage is main-thread-only, so we get an assertion. This patch works around that by using swap directly between two nsCOMPtr<>, which avoids the Assert_NoQueryNeeded(). I called the method "swapMessage" rather than "swap" to emphasize that we are not swapping the whole MessageElement, but just one part of it. I find the existing forget() name to be confusing. try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c3ae9760c82c
Attachment #8669153 -
Flags: review?(nfroyd)
Updated•9 years ago
|
Attachment #8669153 -
Flags: review?(nfroyd) → review+
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5845fb9f14cf
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•