mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 899238 - Make sure CPOW parent is never null (r=dvander).
This commit is contained in:
parent
86cead439b
commit
b51afaa42f
@ -562,12 +562,14 @@ JavaScriptParent::unwrap(JSContext *cx, ObjectId objId)
|
||||
|
||||
bool callable = !!(objId & OBJECT_IS_CALLABLE);
|
||||
|
||||
RootedObject global(cx, JS_GetGlobalForScopeChain(cx));
|
||||
|
||||
RootedValue v(cx, UndefinedValue());
|
||||
JSObject *obj = NewProxyObject(cx,
|
||||
&CPOWProxyHandler::singleton,
|
||||
v,
|
||||
NULL,
|
||||
NULL,
|
||||
global,
|
||||
callable ? ProxyIsCallable : ProxyNotCallable);
|
||||
if (!obj)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user