Closed Bug 851996 Opened 12 years ago Closed 12 years ago

"Assertion failure: !aGCThing" re-initing event

Categories

(Core :: DOM: Events, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla22
Tracking Status
firefox20 --- unaffected
firefox21 --- unaffected
firefox22 --- fixed
firefox-esr17 --- unaffected
b2g18 --- unaffected

People

(Reporter: jruderman, Assigned: smaug)

References

Details

(4 keywords, Whiteboard: [adv-main22-])

Attachments

(3 files)

Assertion failure: !aGCThing, at js/xpconnect/src/XPCJSRuntime.cpp:319
Attached file stack (gdb) (deleted) —
This looks like something mccr8 would know about.
Yeah, I looked at the stacks a bit. It looks like the problem is that nsDOMMessageEvent::InitMessageEvent calls NS_DROP_JS_OBJECTS without clearing the wrapper cache first. I think this is a regression from bug 822399, which made nsDOMEvent wrapper cached.
Feel free to reassign to me, Olli.
Assignee: nobody → bugs
nah, my bug.
Ok, I have the patch and comment for it: "Good that I added the assertion. So, this should work. If we already have preserved wrapper or object hold, calling NS_HOLD_JS_OBJECTS doesn't really do anything (because the event is already in JSHolders). If we don't have preserved wrapper nor object hold, the event ends up to JSholders. Then we may unlink mData, or if the last reference to the event is released without cycle collector, event's dtor drops the reference." But bugzilla is broken atm. Doesn't accept attachments.
Attached patch patch (deleted) — Splinter Review
Attachment #726124 - Flags: review?(continuation)
Attachment #726124 - Flags: review?(continuation) → review+
Comment on attachment 726124 [details] [diff] [review] patch I can't recall whether this thunk-only bug requires an approval. [Security approval request comment] How easily could an exploit be constructed based on the patch? Crash is quite easy to find. Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem? Comment will be about proper tracing Which older supported branches are affected by this flaw? None. This is a regression from bug 822399 How likely is this patch to cause regressions; how much testing does it need? Not likely to cause regressions.
Attachment #726124 - Flags: sec-approval?
Comment on attachment 726124 [details] [diff] [review] patch Trunk-only does not need sec-approval.
Attachment #726124 - Flags: sec-approval?
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Whiteboard: [adv-main22-]
Group: core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: