mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
Use hasProperty rather than getProperty to avoid creation of lazily evaluated properties.
This commit is contained in:
parent
f689d29f4a
commit
887959238b
@ -1102,8 +1102,7 @@ public class ScriptRuntime {
|
||||
public static Scriptable getBase(Scriptable scope, String id) {
|
||||
Scriptable obj = scope;
|
||||
while (obj != null) {
|
||||
Object result = ScriptableObject.getProperty(obj, id);
|
||||
if (result != Scriptable.NOT_FOUND)
|
||||
if (ScriptableObject.hasProperty(obj, id))
|
||||
return obj;
|
||||
obj = obj.getParentScope();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user