Closed
Bug 679494
Opened 13 years ago
Closed 13 years ago
"compartment mismatched" when listening message event
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla9
People
(Reporter: ochameau, Assigned: bholley)
References
Details
Attachments
(4 files, 1 obsolete file)
7.96 KB,
text/plain
|
Details | |
1.64 KB,
patch
|
mrbkap
:
review+
christian
:
approval-mozilla-beta-
|
Details | Diff | Splinter Review |
2.55 KB,
patch
|
khuey
:
review+
christian
:
approval-mozilla-beta-
|
Details | Diff | Splinter Review |
822 bytes,
patch
|
khuey
:
review+
jst
:
approval-mozilla-beta-
|
Details | Diff | Splinter Review |
Assertion failure: compartment mismatched, at /home/pouf/mozilla-central/js/src/jscntxtinlines.h:120 when running the following script in JS console: var w=top.opener.gBrowser.contentDocument.defaultView; w.addEventListener("message", function(event) { alert(event.data); }, false); w.postMessage("test"); I suppose that it only occurs when we listen to `message` event from another compartment than the event source document.
Comment 1•13 years ago
|
||
Alex found me on IRC and was kind enough to pastebin a stack trace. The relevant bit is: #9 0x025800a8 in js::CallJSPropertyOp (cx=0xb1d0b570, op= 0x19b0a65 <nsIDOMMessageEvent_GetData(JSContext*, JSObject*, jsid, jsval*)>, receiver=0xad49be40, id=..., vp=0xbfffb638) this shows us that the problem is a getter returning a value in another compartment. Some quick MXRing later shows us that the problem is that nsDOMMessageEvent::GetData passes through its jsval without wrapping it. So, we need to call JS_WrapValue before returning the data, but in order to do that, we're going to need to add [implicit_jscontext] to the IDL in order to get a cx with with to call JS_WrapValue.
Assignee: nobody → bobbyholley+bmo
Assignee | ||
Comment 2•13 years ago
|
||
Attaching the full stack trace to give n00bs like myself a better sense of what's going on.
Comment 3•13 years ago
|
||
What is the priority of getting a fix here? This is causing the Jetpack tests to fail and presumably causing problems for add-ons using the functionality we expose
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Dave Townsend (:Mossop) from comment #3) > What is the priority of getting a fix here? This is causing the Jetpack > tests to fail and presumably causing problems for add-ons using the > functionality we expose I've got a patch. Just tweaking it a bit and I'll post it for review real soon now.
Assignee | ||
Comment 5•13 years ago
|
||
Assignee | ||
Comment 6•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #554167 -
Flags: review?(mrbkap)
Assignee | ||
Comment 7•13 years ago
|
||
Comment on attachment 554168 [details] [diff] [review] Bug 679494 - Tests. v1 Added a patch and tests. Flagging bkap for review.
Attachment #554168 -
Flags: review?(mrbkap)
Why do you need a browser chrome test here? You should be able to do it with a chrome test with a content iframe, no?
Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #8) > Why do you need a browser chrome test here? You should be able to do it > with a chrome test with a content iframe, no? Probably - I was just trying to match the test-case as much as possible. Would that be preferable? I'm not sure of the relative overhead.
Assignee | ||
Comment 10•13 years ago
|
||
> Would that be preferable? I'm not sure of the relative overhead. I'm going to assume from comment 8 that it is. Here's an updated version. Flagging khuey for review.
Attachment #554168 -
Attachment is obsolete: true
Attachment #554168 -
Flags: review?(mrbkap)
Attachment #554195 -
Flags: review?(khuey)
Comment on attachment 554195 [details] [diff] [review] Bug 679494 - Tests v2 Yeah, this is better. Chrome tests are preferable to browser-chrome tests because they run in all Gecko things and not Firefox. We generally avoid browser-chrome tests for anything except the browser UI.
Attachment #554195 -
Flags: review?(khuey) → review+
Updated•13 years ago
|
Attachment #554167 -
Flags: review?(mrbkap) → review+
Comment 12•13 years ago
|
||
Try run for e05ba95b7e9e is complete. Detailed breakdown of the results available here: http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=e05ba95b7e9e Results (out of 27 total builds): success: 25 warnings: 2 Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/bobbyholley@gmail.com-e05ba95b7e9e
Assignee | ||
Comment 13•13 years ago
|
||
Landed on mozilla-inbound: http://hg.mozilla.org/integration/mozilla-inbound/rev/70a6be6a9caa http://hg.mozilla.org/integration/mozilla-inbound/rev/b1844f9cf777
Whiteboard: [inbound]
Comment 14•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/70a6be6a9caa http://hg.mozilla.org/mozilla-central/rev/b1844f9cf777
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
Version: unspecified → Trunk
(In reply to Ms2ger from comment #15) > And this should have had a uuid bump, surely? It needs one, yes.
Assignee | ||
Comment 17•13 years ago
|
||
D'oh!. Attaching a followup. Flagging khuey for review.
Attachment #554905 -
Flags: review?(khuey)
Assignee | ||
Updated•13 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #554905 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 18•13 years ago
|
||
Landed on mozilla-inbound: http://hg.mozilla.org/integration/mozilla-inbound/rev/98725bc76d7e
Assignee | ||
Updated•13 years ago
|
Whiteboard: [inbound]
Comment 19•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/98725bc76d7e
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Assignee | ||
Updated•13 years ago
|
Attachment #554167 -
Flags: approval-mozilla-beta?
Assignee | ||
Updated•13 years ago
|
Attachment #554905 -
Flags: approval-mozilla-beta?
Assignee | ||
Updated•13 years ago
|
Attachment #554195 -
Flags: approval-mozilla-beta?
Comment 21•13 years ago
|
||
Why was this nominated for beta? What is the risk vs reward? We're heavily leaning against taking this due to the uuid change.
Comment 22•13 years ago
|
||
Comment on attachment 554905 [details] [diff] [review] Bug 679494 - UUID rev followup. v1 We're going to wait another 6 weeks and get this in Firefox 9 since this is already in aurora (and the reasons that made me ask bholley to request approval here have since been invalidated, or at least lowered in weight).
Attachment #554905 -
Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #554195 -
Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #554167 -
Flags: approval-mozilla-beta? → approval-mozilla-beta-
Comment 23•10 years ago
|
||
The test incorrectly referenced file_679494.html instead of file_bug679494.html, fixed in: https://hg.mozilla.org/integration/mozilla-inbound/rev/28a7a3744901
You need to log in
before you can comment on or make changes to this bug.
Description
•