projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c9e1bd7
)
2002/04/28 03:49:17
author
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:46:05 +0000
(06:46 +0000)
committer
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:46:05 +0000
(06:46 +0000)
darcs-hash:
20040130064605
-2ba56-
ecbe21e713f75d5bb4b376c1fb3b3fe39509617a
.gz
CHANGES
patch
|
blob
|
history
src/org/xwt/util/JSObject.java
patch
|
blob
|
history
diff --git
a/CHANGES
b/CHANGES
index
36abfd7
..
9306fa8
100644
(file)
--- a/
CHANGES
+++ b/
CHANGES
@@
-55,3
+55,6
@@
XWT upgrades work more smoothly, and to prevent problems
with browser/plugin caches.
XWT upgrades work more smoothly, and to prevent problems
with browser/plugin caches.
+27-Apr megacz JSObject.java: added extra debugging info
+
+
diff --git
a/src/org/xwt/util/JSObject.java
b/src/org/xwt/util/JSObject.java
index
81f36ea
..
9f3f4bf
100644
(file)
--- a/
src/org/xwt/util/JSObject.java
+++ b/
src/org/xwt/util/JSObject.java
@@
-26,7
+26,12
@@
public class JSObject implements Scriptable {
/** helper; retrieves the 'source code filename' (usually the nodeName) of the currently-executing function in this thread */
public static String getCurrentFunctionSourceName() {
/** 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();
if (cf == null) return null;
return (cf instanceof InterpretedFunction) ?
((InterpretedFunction)cf).getSourceName() : ((InterpretedScript)cf).getSourceName();