Bug 1073631 - Add mising waivier outerizing for CPOWs (r=bholley)

This commit is contained in:
Bill McCloskey
2014-11-03 07:10:27 -08:00
parent 73f1236da5
commit dcbbf9bfda

View File

@@ -517,6 +517,12 @@ JavaScriptShared::findObjectById(JSContext *cx, const ObjectId &objId)
// wrappers.
JSAutoCompartment ac(cx, scopeForTargetObjects());
if (objId.hasXrayWaiver()) {
{
JSAutoCompartment ac2(cx, obj);
obj = JS_ObjectToOuterObject(cx, obj);
if (!obj)
return nullptr;
}
if (!xpc::WrapperFactory::WaiveXrayAndWrap(cx, &obj))
return nullptr;
} else {