From f8d3f0e25d9be8035d41bcbb8d7778065750874b Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 28 Jul 2004 19:00:52 +0000 Subject: [PATCH] Allow onCodeUpdate function to be defined in prototype chain. --- src/helma/scripting/rhino/RhinoCore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helma/scripting/rhino/RhinoCore.java b/src/helma/scripting/rhino/RhinoCore.java index 81499d51..ee05170d 100644 --- a/src/helma/scripting/rhino/RhinoCore.java +++ b/src/helma/scripting/rhino/RhinoCore.java @@ -262,7 +262,7 @@ public final class RhinoCore { // If this prototype defines a postCompile() function, call it Context cx = Context.getCurrentContext(); try { - Object fObj = op.get("onCodeUpdate",op); + Object fObj = ScriptableObject.getProperty(op, "onCodeUpdate"); if (fObj instanceof Function) { ((Function) fObj).call(cx, global, op, new Object[0]); }