* Check if property is set before trying to set its attribute in dontEnum().
Fixes bug 455.
This commit is contained in:
parent
cd047f9371
commit
c3cd2be291
1 changed files with 3 additions and 1 deletions
|
@ -650,7 +650,9 @@ public class GlobalObject extends ImporterTopLevel implements PropertyRecorder {
|
||||||
throw new EvaluatorException("dontEnum() called with non-String argument");
|
throw new EvaluatorException("dontEnum() called with non-String argument");
|
||||||
}
|
}
|
||||||
String str = (String) args[i];
|
String str = (String) args[i];
|
||||||
obj.setAttributes(str, obj.getAttributes(str) | DONTENUM);
|
if (obj.has(str, obj)) {
|
||||||
|
obj.setAttributes(str, obj.getAttributes(str) | DONTENUM);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue