From 6564fd58e3e56e5b33039d40712b4d770e1c1317 Mon Sep 17 00:00:00 2001 From: "rginda%netscape.com" Date: Thu, 14 Feb 2002 07:52:02 +0000 Subject: [PATCH] bug 124474, "JS_IsNativeFrame should return !fp->script" also includes typo fix from bug 124474 sr=shaver, r=jband --- js/src/jsdbgapi.c | 4 ++-- js/src/jsdbgapi.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/src/jsdbgapi.c b/js/src/jsdbgapi.c index ac9f2af89bf..d308625f741 100644 --- a/js/src/jsdbgapi.c +++ b/js/src/jsdbgapi.c @@ -612,7 +612,7 @@ JS_GetFramePrincipalArray(JSContext *cx, JSStackFrame *fp) JS_PUBLIC_API(JSBool) JS_IsNativeFrame(JSContext *cx, JSStackFrame *fp) { - return fp->fun && fp->fun->native; + return !fp->script; } /* this is deprecated, use JS_GetFrameScopeChain instead */ @@ -670,7 +670,7 @@ JS_GetFrameFunctionObject(JSContext *cx, JSStackFrame *fp) } JS_PUBLIC_API(JSBool) -JS_IsContructorFrame(JSContext *cx, JSStackFrame *fp) +JS_IsConstructorFrame(JSContext *cx, JSStackFrame *fp) { return (fp->flags & JSFRAME_CONSTRUCTING) != 0; } diff --git a/js/src/jsdbgapi.h b/js/src/jsdbgapi.h index 786fb7a2176..890ba788399 100644 --- a/js/src/jsdbgapi.h +++ b/js/src/jsdbgapi.h @@ -161,8 +161,10 @@ JS_GetFrameFunction(JSContext *cx, JSStackFrame *fp); extern JS_PUBLIC_API(JSObject *) JS_GetFrameFunctionObject(JSContext *cx, JSStackFrame *fp); +/* XXXrginda Initially published with typo */ +#define JS_IsContructorFrame JS_IsConstructorFrame extern JS_PUBLIC_API(JSBool) -JS_IsContructorFrame(JSContext *cx, JSStackFrame *fp); +JS_IsConstructorFrame(JSContext *cx, JSStackFrame *fp); extern JS_PUBLIC_API(JSBool) JS_IsDebuggerFrame(JSContext *cx, JSStackFrame *fp);