XWT upgrades work more smoothly, and to prevent problems
with browser/plugin caches.
+27-Apr megacz JSObject.java: added extra debugging info
+
+
/** helper; retrieves the 'source code filename' (usually the nodeName) of the currently-executing function in this thread */
public static String getCurrentFunctionSourceName() {
- Function cf = Context.getCurrentContext().currentFunction;
+ Context cx = Context.getCurrentContext();
+ if (cx == null) {
+ if (Log.on) Log.log(JSObject.class, "Context.getCurrentContext() is null in getCurrentFunctionSourceName()");
+ return "unknown";
+ }
+ Function cf = cx.currentFunction;
if (cf == null) return null;
return (cf instanceof InterpretedFunction) ?
((InterpretedFunction)cf).getSourceName() : ((InterpretedScript)cf).getSourceName();