mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 611401 - Avoid potential problems by doing this wrapping ourselves. r=gal
This commit is contained in:
parent
f0e729dee7
commit
50573f6b31
@ -3237,10 +3237,9 @@ xpc_CreateSandboxObject(JSContext * cx, jsval * vp, nsISupports *prinOrSop, JSOb
|
||||
return NS_ERROR_XPC_UNEXPECTED;
|
||||
|
||||
if (xpc::WrapperFactory::IsXrayWrapper(proto) && !wantXrays) {
|
||||
jsval v;
|
||||
if (!JS_GetProperty(cx, proto, "wrappedJSObject", &v))
|
||||
return NS_ERROR_XPC_UNEXPECTED;
|
||||
|
||||
jsval v = OBJECT_TO_JSVAL(proto);
|
||||
if (!xpc::WrapperFactory::WaiveXrayAndWrap(cx, &v))
|
||||
return NS_ERROR_FAILURE;
|
||||
proto = JSVAL_TO_OBJECT(v);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user