* Check if property is set before trying to set its attribute in dontEnum().

Fixes bug 455.
This commit is contained in:
hns 2006-02-09 13:03:03 +00:00
parent cd047f9371
commit c3cd2be291

View file

@ -650,7 +650,9 @@ public class GlobalObject extends ImporterTopLevel implements PropertyRecorder {
throw new EvaluatorException("dontEnum() called with non-String argument");
}
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;
}