зеркало из https://github.com/mozilla/gecko-dev.git
Use hasProperty rather than getProperty to avoid creation of lazily evaluated properties.
This commit is contained in:
Родитель
f689d29f4a
Коммит
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();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче