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:
hns 2001-08-30 12:04:19 +00:00
parent ddb7ec49a4
commit 07aef3dff7

View file

@ -144,7 +144,10 @@ public class RequestEvaluator implements Runnable {
try { try {
do { do {
long startCheck = System.currentTimeMillis ();
app.typemgr.checkPrototypes (); app.typemgr.checkPrototypes ();
System.err.println ("Type check overhead: "+(System.currentTimeMillis ()-startCheck)+" millis");
IPathElement root, currentElement; IPathElement root, currentElement;
// reset skinManager // reset skinManager
skinmanagers = null; skinmanagers = null;
@ -481,7 +484,17 @@ public class RequestEvaluator implements Runnable {
esresult = ESNull.theNull; esresult = ESNull.theNull;
// Just a human readable descriptor of this invocation // Just a human readable descriptor of this invocation
String funcdesc = app.getName()+":internal/"+method; 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); localrtx.begin (funcdesc);
root = app.getDataRoot (); root = app.getDataRoot ();
@ -525,6 +538,7 @@ public class RequestEvaluator implements Runnable {
wrong.printStackTrace (); wrong.printStackTrace ();
this.exception = new Exception (msg); this.exception = new Exception (msg);
} }
break; break;
} }