Object value = objProto.get(key, objProto); if (value instanceof FunctionObject) {  continue; }  if (!changedProperties.contains(key)) { try { objProto.setAttributes(key, 0); objProto.delete(key); } catch (Exception px) { System.err.println("Error unsetting property "+key+" on "+ frameworkProto.getName()); }
try { objProto.setAttributes(key, 0); objProto.delete(key); } catch (Exception px) { System.err.println("Error unsetting property "+key+" on "+ frameworkProto.getName());
        public void commitCompilation() {            // loop through properties defined on the prototype object            // and remove thos properties which haven't been renewed during            // this compilation/evaluation pass.            if (objProto instanceof PropertyRecorder) {                PropertyRecorder recorder = (PropertyRecorder) objProto;                recorder.stopRecording();                Set changedProperties = recorder.getChangeSet();                recorder.clearChangeSet();                Object[] keys = objProto.getAllIds();                for (int i = 0; i < keys.length; i++) {                    if (! (keys[i] instanceof String)) {                        continue;                    }                    String key = (String) keys[i];                    if (predefinedProperties.contains(key)) {                        // don't mess with properties we didn't set                        continue;                    }                    Object value = objProto.get(key, objProto);                    if (value instanceof FunctionObject) {                        // this is probably a HopObject Constructor - don't remove!                        continue;                    }                    if (!changedProperties.contains(key)) {                        try {                            objProto.setAttributes(key, 0);                            objProto.delete(key);                        } catch (Exception px) {                            System.err.println("Error unsetting property "+key+" on "+                                               frameworkProto.getName());                        }                    }                }            }            // mark this type as updated            lastUpdate = frameworkProto.getLastUpdate();            // If this prototype defines a postCompile() function, call it            Context cx = Context.getCurrentContext();            try {                Object fObj = ScriptableObject.getProperty(objProto,                                                           "onCodeUpdate");                if (fObj instanceof Function) {                    Object[] args = {frameworkProto.getName()};                    ((Function) fObj).call(cx, global, objProto, args);                }            } catch (Exception x) {                app.logError("Exception in "+frameworkProto.getName()+                             ".onCodeUpdate(): " + x, x);            }        }