Allow getOwnPropertyDescriptor to be called for objects with no scope, e.g. functions returned from Function.bind
Patch from Raphael Speyer git-svn-id: svn://10.0.0.236/trunk@257814 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
81c1d523fc
commit
1d48eb38a0
@ -726,7 +726,7 @@ public abstract class IdScriptableObject extends ScriptableObject
|
||||
|
||||
desc = new NativeObject();
|
||||
Scriptable scope = getParentScope();
|
||||
ScriptRuntime.setObjectProtoAndParent(desc, scope);
|
||||
ScriptRuntime.setObjectProtoAndParent(desc, (scope == null ? this : scope));
|
||||
|
||||
desc.defineProperty("value", value, EMPTY);
|
||||
desc.defineProperty("enumerable", false, EMPTY);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user