Accessor functions for cx->fp, bug 588978. r=lw

This commit is contained in:
Brian Hackett 2010-08-23 14:36:40 -07:00
Родитель 915535c6d3
Коммит 3e5c7400d7
3 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -2241,7 +2241,7 @@ jstv_Lineno(JSContext *cx, JSStackFrame *fp)
JS_FRIEND_API(void) JS_FRIEND_API(void)
js::StoreTraceVisState(JSContext *cx, TraceVisState s, TraceVisExitReason r) js::StoreTraceVisState(JSContext *cx, TraceVisState s, TraceVisExitReason r)
{ {
JSStackFrame *fp = cx->fp; JSStackFrame *fp = cx->fp();
char *script_file = jstv_Filename(fp); char *script_file = jstv_Filename(fp);
JSHashNumber hash = JS_HashString(script_file); JSHashNumber hash = JS_HashString(script_file);

Просмотреть файл

@ -217,8 +217,8 @@ DTrace::ObjectCreationScope::handleCreationEnd()
void void
DTrace::ObjectCreationScope::handleCreationImpl(JSObject *obj) DTrace::ObjectCreationScope::handleCreationImpl(JSObject *obj)
{ {
JAVASCRIPT_OBJECT_CREATE(jsdtrace_filename(cx->fp), (char *)clasp->name, (uintptr_t)obj, JAVASCRIPT_OBJECT_CREATE(jsdtrace_filename(fp), (char *)clasp->name, (uintptr_t)obj,
jsdtrace_frame_linenumber(cx, cx->fp)); jsdtrace_frame_linenumber(cx, fp));
} }
void void

Просмотреть файл

@ -345,18 +345,19 @@ PropertyCache::fullTest(JSContext *cx, jsbytecode *pc, JSObject **objp, JSObject
JSAtom *atom = GetAtomFromBytecode(cx, pc, op, cs); JSAtom *atom = GetAtomFromBytecode(cx, pc, op, cs);
#ifdef DEBUG_notme #ifdef DEBUG_notme
JSScript *script = cx->fp()->getScript();
fprintf(stderr, fprintf(stderr,
"id miss for %s from %s:%u" "id miss for %s from %s:%u"
" (pc %u, kpc %u, kshape %u, shape %u)\n", " (pc %u, kpc %u, kshape %u, shape %u)\n",
js_AtomToPrintableString(cx, atom), js_AtomToPrintableString(cx, atom),
cx->fp->script->filename, script->filename,
js_PCToLineNumber(cx, cx->fp->script, pc), js_PCToLineNumber(cx, script, pc),
pc - cx->fp->script->code, pc - script->code,
entry->kpc - cx->fp->script->code, entry->kpc - script->code,
entry->kshape, entry->kshape,
obj->shape()); obj->shape());
js_Disassemble1(cx, cx->fp->script, pc, js_Disassemble1(cx, script, pc,
pc - cx->fp->script->code, pc - script->code,
JS_FALSE, stderr); JS_FALSE, stderr);
#endif #endif