mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 811343 - proxy parent to cx->global() by default; r=bholley
This commit is contained in:
parent
a630f04b9d
commit
9512db91d6
@ -3178,12 +3178,9 @@ proxy(JSContext *cx, unsigned argc, jsval *vp)
|
||||
RootedObject proto(cx);
|
||||
if (!JSObject::getProto(cx, target, &proto))
|
||||
return false;
|
||||
JSObject *parent = NULL;
|
||||
if (proto)
|
||||
parent = proto->getParent();
|
||||
RootedObject fun(cx, target->isCallable() ? target : (JSObject *) NULL);
|
||||
JSObject *proxy = NewProxyObject(cx, &ScriptedDirectProxyHandler::singleton,
|
||||
ObjectValue(*target), proto, parent,
|
||||
ObjectValue(*target), proto, cx->global(),
|
||||
fun, fun);
|
||||
if (!proxy)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user