Closed Bug 600022 Opened 14 years ago Closed 14 years ago

TM: set right compartment in XPCShellEnvironment::Init()

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gwagner, Assigned: gal)

References

Details

(Whiteboard: [compartments], fixed-in-tracemonkey)

Attachments

(1 file, 2 obsolete files)

from xpcshell tests

#8  0x428bc5f9 in JS_Assert (
    s=0x42a09804 "cx->compartment != cx->runtime->defaultCompartment", 
    file=0x42a04618 "/home/wagnerg/code/ws1/js/src/jsapi.cpp", ln=4296)
    at /home/wagnerg/code/ws1/js/src/jsutil.cpp:83
#9  0x42757d7c in JS_DefineFunctions (cx=0x441876a0, obj=0x44f3cf30, 
    fs=0x4231d300) at /home/wagnerg/code/ws1/js/src/jsapi.cpp:4296
#10 0x4191a22a in mozilla::ipc::XPCShellEnvironment::Init (this=0x43b10400)
    at /home/wagnerg/code/ws1/ipc/testshell/XPCShellEnvironment.cpp:1175
#11 0x419196b1 in mozilla::ipc::XPCShellEnvironment::CreateEnvironment ()
    at /home/wagnerg/code/ws1/ipc/testshell/XPCShellEnvironment.cpp:1012
#12 0x41915667 in TestShellChild (this=0x440159a0)
    at /home/wagnerg/code/ws1/ipc/testshell/TestShellChild.cpp:47
Blocks: 594455
Attached patch patch (obsolete) — Splinter Review
Proposed fix. Please test.
Assignee: general → gal
Attached patch patch (obsolete) — Splinter Review
Attachment #478898 - Attachment is obsolete: true
Another mixup here:
#8  0x41cddfe5 in JS_Assert (s=0x4249e7b4 "cx->compartment != cx->runtime->defaultCompartment", file=0x424995c8 "/home/wagnerg/code/ws1/js/src/jsapi.cpp", ln=4384)
    at /home/wagnerg/code/ws1/js/src/jsutil.cpp:83
#9  0x41ba33f0 in JS_CompileUCScriptForPrincipals (cx=0x441a66a0, obj=0x44f3cf30, principals=0x44180e24, chars=0x43b9a408, length=252, filename=0x4242a4ba "typein", lineno=0)
    at /home/wagnerg/code/ws1/js/src/jsapi.cpp:4384
#10 0x4193579b in mozilla::ipc::XPCShellEnvironment::EvaluateString (this=0x43b10400, aString=..., aResult=0x0) at /home/wagnerg/code/ws1/ipc/testshell/XPCShellEnvironment.cpp:1216
#11 0x419309bf in mozilla::ipc::TestShellChild::RecvExecuteCommand (this=0x440159d0, aCommand=...) at /home/wagnerg/code/ws1/ipc/testshell/TestShellChild.cpp:59
#12 0x41917b9a in mozilla::ipc::PTestShellChild::OnMessageReceived (this=0x440159d0, __msg=...) at PTestShellChild.cpp:191
#13 0x418c8ca9 in mozilla::dom::PContentChild::OnMessageReceived (this=0x43b37198, __msg=...) at PContentChild.cpp:606
#14 0x417bfb73 in mozilla::ipc::AsyncChannel::OnDispatchMessage (this=0x43b371a0, msg=...) at /home/wagnerg/code/ws1/ipc/glue/AsyncChannel.cpp:262
#15 0x417c824d in mozilla::ipc::RPCChannel::OnMaybeDequeueOne (this=0x43b371a0) at /home/wagnerg/code/ws1/ipc/glue/RPCChannel.cpp:438
#16 0x417cdcb3 in void DispatchToMethod<mozilla::ipc::RPCChannel, bool (mozilla::ipc::RPCChannel::*)()>(mozilla::ipc::RPCChannel*, bool (mozilla::ipc::RPCChannel::*)(), Tuple0 const&) () from /home/wagnerg/code/ws1/obj-ff-dbg/dist/bin/libxul.so
#17 0x417cdc3f in RunnableMethod<mozilla::ipc::RPCChannel, bool (mozilla::ipc::RPCChannel::*)(), Tuple0>::Run() () from /home/wagnerg/code/ws1/obj-ff-dbg/dist/bin/libxul.so
Attached patch patchSplinter Review
Attachment #478899 - Attachment is obsolete: true
Comment on attachment 479712 [details] [diff] [review]
patch

r=jst if you replace the tabs in the indentation with space.
Attachment #479712 - Flags: review+
http://hg.mozilla.org/tracemonkey/rev/beae47bff0b1
Whiteboard: [compartments], fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/beae47bff0b1
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: