* Make sure we do not remove HopObject constructors if they aren't referenced during
global code compilation anymore. Fixes bug 464 <http://helma.org/bugs/show_bug.cgi?id=464>
This commit is contained in:
parent
6a96d0c7a0
commit
83dd1e7c1f
1 changed files with 7 additions and 1 deletions
|
@ -903,10 +903,16 @@ public final class RhinoCore implements ScopeProvider {
|
|||
// renewed in this compilation
|
||||
compiledProperties.removeAll(changedProperties);
|
||||
|
||||
boolean isGlobal = "global".equals(frameworkProto.getLowerCaseName());
|
||||
|
||||
Iterator it = compiledProperties.iterator();
|
||||
while (it.hasNext()) {
|
||||
String key = (String) it.next();
|
||||
|
||||
if (isGlobal && prototypes.containsKey(key.toLowerCase())) {
|
||||
// avoid removing HopObject constructor
|
||||
predefinedProperties.add(key);
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
objProto.setAttributes(key, 0);
|
||||
objProto.delete(key);
|
||||
|
|
Loading…
Add table
Reference in a new issue