Closed Bug 1073631 Opened 10 years ago Closed 10 years ago

Assertion failure: !js::IsInnerObject(obj) when using CPOW Xray waiver around window

Categories

(Core :: XPConnect, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: billm, Assigned: billm)

Details

Attachments

(1 file)

I have a testcase in bug 1072467 that does this:
      is(browser.contentWindow.wrappedJSObject.global, 3, "global available on document");

With the patch in bug 1065811 I'm getting this assertion:

Assertion failure: !js::IsInnerObject(obj), at /home/billm/moz/in1/js/xpconnect/wrappers/WrapperFact
ory.cpp:573
xpc::WrapperFactory::WaiveXrayAndWrap(JSContext*, JS::MutableHandle<JSObject*>) (/home/billm/moz/in1
/js/xpconnect/wrappers/WrapperFactory.cpp:573 (discriminator 1))
mozilla::jsipc::JavaScriptShared::findObjectById(JSContext*, mozilla::jsipc::ObjectId const&) (/home
/billm/moz/in1/js/ipc/JavaScriptShared.cpp:401)
mozilla::jsipc::WrapperAnswer::AnswerInstanceOf(mozilla::jsipc::ObjectId const&, mozilla::jsipc::JSI
ID const&, mozilla::jsipc::ReturnStatus*, bool*) (/home/billm/moz/in1/js/ipc/WrapperAnswer.cpp:594)
mozilla::jsipc::JavaScriptBase<mozilla::jsipc::PJavaScriptChild>::AnswerInstanceOf(unsigned long con
st&, mozilla::jsipc::JSIID const&, mozilla::jsipc::ReturnStatus*, bool*) (/home/billm/moz/in1/js/ipc
/JavaScriptBase.h:108)

Can you help, Bobby? It sounds like maybe we just need to outerize somewhere?
Flags: needinfo?(bobbyholley)
Also, I need to remember to fix the test in bug 1072467 once this is fixed.
Yeah, we just need a call to JS_ObjectToOuterObject right before the WaiveXrayAndWrap in JavascriptShared.cpp. r=me on that.
Flags: needinfo?(bobbyholley)
Unfortunately that seems to trigger a compartment mismatch in test_cpows.xul. I'll try to look into it soon.
I was mistaken about what the problem was here. I think this should work.
Assignee: nobody → wmccloskey
Status: NEW → ASSIGNED
Attachment #8515337 - Flags: review?(bobbyholley)
Attachment #8515337 - Flags: review?(bobbyholley) → review+
https://hg.mozilla.org/mozilla-central/rev/0e314ec744be
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: