Committing patch from Rashid to call postCompile() function if it is defined
after a prototype has been evaluated.
This commit is contained in:
parent
e1139be0ff
commit
2a24c4f8aa
1 changed files with 11 additions and 0 deletions
|
@ -258,6 +258,17 @@ public final class RhinoCore {
|
|||
|
||||
type.compiledFunctions = newFunctions;
|
||||
type.lastUpdate = prototype.getLastUpdate();
|
||||
|
||||
// If this prototype defines a postCompile() function, call it
|
||||
Context cx = Context.getCurrentContext();
|
||||
try {
|
||||
Object fObj = op.get("postCompile",op);
|
||||
if (fObj instanceof Function) {
|
||||
((Function) fObj).call(cx, global, op, new Object[0]);
|
||||
}
|
||||
} catch (Exception x) {
|
||||
app.logError("Exception in "+prototype.getName()+".postCompile(): " + x, x);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue