internal function calls are only tried if the
target object is not the global object or if the global function is defined.
This commit is contained in:
parent
ddb7ec49a4
commit
07aef3dff7
1 changed files with 15 additions and 1 deletions
|
@ -144,7 +144,10 @@ public class RequestEvaluator implements Runnable {
|
|||
try {
|
||||
do {
|
||||
|
||||
long startCheck = System.currentTimeMillis ();
|
||||
app.typemgr.checkPrototypes ();
|
||||
System.err.println ("Type check overhead: "+(System.currentTimeMillis ()-startCheck)+" millis");
|
||||
|
||||
IPathElement root, currentElement;
|
||||
// reset skinManager
|
||||
skinmanagers = null;
|
||||
|
@ -481,7 +484,17 @@ public class RequestEvaluator implements Runnable {
|
|||
esresult = ESNull.theNull;
|
||||
// Just a human readable descriptor of this invocation
|
||||
String funcdesc = app.getName()+":internal/"+method;
|
||||
try {
|
||||
|
||||
// avoid going into transaction if called function doesn't exist
|
||||
boolean functionexists = true;
|
||||
if (current != null) try {
|
||||
functionexists = global.getProperty (method, method.hashCode()) != ESUndefined.theUndefined;
|
||||
} catch (EcmaScriptException x) {}
|
||||
|
||||
if (!functionexists)
|
||||
// global function doesn't exist, nothing to do here.
|
||||
reqtype = NONE;
|
||||
else try {
|
||||
localrtx.begin (funcdesc);
|
||||
|
||||
root = app.getDataRoot ();
|
||||
|
@ -525,6 +538,7 @@ public class RequestEvaluator implements Runnable {
|
|||
wrong.printStackTrace ();
|
||||
this.exception = new Exception (msg);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue