Closed Bug 631289 Opened 14 years ago Closed 13 years ago

"compartment mismatched" assertion when changing mochitest harness

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dbaron, Unassigned)

References

Details

(Whiteboard: js-triage-needed)

I was trying to change the mochitest harness a bit for bug 404077 (I think I may just give up on those changes and hope that there aren't many assertions during unloading of pages). However, they led me to reliable steps to reproduce a "compartment mismatched" assertion: 1. Start with a mozilla-central tree (in particular, I'm building on top of https://hg.mozilla.org/mozilla-central/rev/95b2986b495e ) 2. Apply the patch http://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/8aa4cd1167e8/mochitest-assertion-checking (I reproduced this bug both locally by applying all the patches in http://hg.mozilla.org/users/dbaron_mozilla.com/patches/rev/8aa4cd1167e8 and on try by applying only the patch stated.) 3. In the objdir, run TEST_PATH=layout/xul/base/test make mochitest-plain During test_resizer, I get a compartment mismatched assertion at the following stack: #0 JS_Assert (s=0x2ae52fe94b30 "compartment mismatched", file=0x2ae52fe964b0 "/home/dbaron/builds/ssd/mozilla-central/mozilla/js/src/jscntxtinlines.h", ln=541) at /home/dbaron/builds/ssd/mozilla-central/mozilla/js/src/jsutil.cpp:65 #1 0x00002ae52f72609b in fail (cx=0x40c6b90, obj=0x2ae54da1f678, script=0x4190d90, rval=0x7fff4ea9be50) at /home/dbaron/builds/ssd/mozilla-central/mozilla/js/src/jscntxtinlines.h:541 #2 check (cx=0x40c6b90, obj=0x2ae54da1f678, script=0x4190d90, rval=0x7fff4ea9be50) at /home/dbaron/builds/ssd/mozilla-central/mozilla/js/src/jscntxtinlines.h:557 #3 check (cx=0x40c6b90, obj=0x2ae54da1f678, script=0x4190d90, rval=0x7fff4ea9be50) at /home/dbaron/builds/ssd/mozilla-central/mozilla/js/src/jscntxtinlines.h:610 #4 assertSameCompartment<JSObject*, JSScript*> (cx=0x40c6b90, obj=0x2ae54da1f678, script=0x4190d90, rval=0x7fff4ea9be50) at /home/dbaron/builds/ssd/mozilla-central/mozilla/js/src/jscntxtinlines.h:647 #5 JS_ExecuteScript (cx=0x40c6b90, obj=0x2ae54da1f678, script=0x4190d90, rval=0x7fff4ea9be50) at /home/dbaron/builds/ssd/mozilla-central/mozilla/js/src/jsapi.cpp:4903 #6 0x00002ae52e51533b in nsJSContext::ExecuteScript (this=0x425a370, aScriptObject=0x2ae54da62dc8, aScopeObject=0x2ae54da1f678, aRetValue=0x0, aIsUndefined=0x0) at /home/dbaron/builds/ssd/mozilla-central/mozilla/dom/base/nsJSEnvironment.cpp:1722 #7 0x00002ae52e4c9e80 in nsXULDocument::ExecuteScript (this=0x3bfef60, aScript=0x3638440) at /home/dbaron/builds/ssd/mozilla-central/mozilla/content/xul/document/src/nsXULDocument.cpp:3656 #8 0x00002ae52e4dc1eb in nsXULDocument::OnStreamComplete (this=0x3bfef60, aLoader=<value optimized out>, context=<value optimized out>, aStatus=<value optimized out>, stringLen=<value optimized out>, string=<value optimized out>) at /home/dbaron/builds/ssd/mozilla-central/mozilla/content/xul/document/src/nsXULDocument.cpp:3524 #9 0x00002ae52dae10ff in nsStreamLoader::OnStopRequest (this=0x3c02730, request=0x0, ctxt=<value optimized out>, aStatus=0) at /home/dbaron/builds/ssd/mozilla-central/mozilla/netwerk/base/src/nsStreamLoader.cpp:125 #10 0x00002ae52dbb8340 in nsHttpChannel::OnStopRequest (this=0x4362360, request=0x362cc80, ctxt=<value optimized out>, status=0) at /home/dbaron/builds/ssd/mozilla-central/mozilla/netwerk/protocol/http/nsHttpChannel.cpp:4023 #11 0x00002ae52daa5214 in nsInputStreamPump::OnStateStop (this=0x362cc80) at /home/dbaron/builds/ssd/mozilla-central/mozilla/netwerk/base/src/nsInputStreamPump.cpp:578 #12 0x00002ae52daa6a70 in nsInputStreamPump::OnInputStreamReady ( this=0x362cc80, stream=<value optimized out>) at /home/dbaron/builds/ssd/mozilla-central/mozilla/netwerk/base/src/nsInputStreamPump.cpp:403 #13 0x00002ae52f4e8ead in nsInputStreamReadyEvent::Run (this=0x4191f50) at /home/dbaron/builds/ssd/mozilla-central/mozilla/xpcom/io/nsStreamUtils.cpp:112 #14 0x00002ae52f515e5e in nsThread::ProcessNextEvent (this=0x2072ac0, mayWait=1, result=<value optimized out>) at /home/dbaron/builds/ssd/mozilla-central/mozilla/xpcom/threads/nsThread.cpp:647 (More stack frames follow...)
This one is not obviously a dup of bug 627954 as its not an assert in CallJSNative after XPC_WN_CallMethod.
This is still present in mozilla-central from a day or two ago (definitely after the big tracemonkey merge earlier this week).
Blocks: 404077
Whiteboard: js-triage-needed
I can't reproduce this atop my moderately-modified tree. dbaron, can you?
I recall testing it a month or two ago and seeing that it wasn't a problem anymore, but I'm not 100% sure.
Yes, https://tbpl.mozilla.org/?tree=Try&rev=969ff99bae00 confirms it no longer occurs (but there are bunch of other failures now that didn't occur before).
Excellent.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.