mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1142241. Stop using getParent() in js::GetObjectEnvironmentObjectForFunction. r=waldo
This commit is contained in:
parent
32fcbbd5d3
commit
9b5f48b73d
@ -2503,11 +2503,11 @@ JS_FRIEND_API(JSObject *)
|
||||
js::GetObjectEnvironmentObjectForFunction(JSFunction *fun)
|
||||
{
|
||||
if (!fun->isInterpreted())
|
||||
return fun->getParent();
|
||||
return &fun->global();
|
||||
|
||||
JSObject *env = fun->environment();
|
||||
if (!env || !env->is<DynamicWithObject>())
|
||||
return fun->getParent();
|
||||
return &fun->global();
|
||||
|
||||
return &env->as<DynamicWithObject>().object();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user