Bug 511418 - static-analysis error in jsobj.cpp:4257: cannot access JS_REQUIRES_STACK variable JSContext::fp and another trivial error in jstracer.cpp. r=gal.

--HG--
extra : rebase_source : 9ee93b34fbf656437932a4f3c8b373a11911cffd
This commit is contained in:
Jason Orendorff 2009-08-20 14:13:21 -05:00
parent 8616b8e0d1
commit 5418886640
4 changed files with 16 additions and 2 deletions

View File

@ -1850,3 +1850,14 @@ js_GetCurrentBytecodePC(JSContext* cx)
*/
return (*pc == JSOP_CALL && imacpc) ? imacpc : pc;
}
bool
js_CurrentPCIsInImacro(JSContext *cx)
{
#ifdef JS_TRACER
VOUCH_DOES_NOT_REQUIRE_STACK();
return (JS_ON_TRACE(cx) ? cx->bailExit->imacpc : cx->fp->imacpc) != NULL;
#else
return false;
#endif
}

View File

@ -1583,6 +1583,9 @@ js_GetScriptedCaller(JSContext *cx, JSStackFrame *fp);
extern jsbytecode*
js_GetCurrentBytecodePC(JSContext* cx);
extern bool
js_CurrentPCIsInImacro(JSContext *cx);
#ifdef JS_TRACER
/*
* Reconstruct the JS stack and clear cx->tracecx. We must be currently in a

View File

@ -4256,7 +4256,7 @@ js_GetPropertyHelper(JSContext *cx, JSObject *obj, jsid id, JSBool cacheResult,
} else {
if (!JS_HAS_STRICT_OPTION(cx) ||
(op != JSOP_GETPROP && op != JSOP_GETELEM) ||
cx->fp->imacpc) {
js_CurrentPCIsInImacro(cx)) {
return JS_TRUE;
}

View File

@ -4007,7 +4007,7 @@ TypeMapLinkability(JSContext* cx, const TypeMap& typeMap, VMFragment* peer)
return consensus;
}
static unsigned
static JS_REQUIRES_STACK unsigned
FindUndemotesInTypemaps(JSContext* cx, const TypeMap& typeMap, TreeInfo* treeInfo,
Queue<unsigned>& undemotes)
{