Bug 481444 - TM: objectHook is called on trace, via js_NewObject [@ LeaveTree] or [@ js_SynthesizeFrame]. r=gal.

Thanks Daniel!
This commit is contained in:
Jason Orendorff committed 2009-03-12 08:34:57 -05:00
1 parent 84edfd6b1f
commit 17936527bd
1 file changed
+5 -1
+5 -1
View File
@@ -3155,7 +3155,11 @@ js_NewObjectWithGivenProto(JSContext *cx, JSClass *clasp, JSObject *proto,
}
}
if (cx->debugHooks->objectHook) {
/*
* Do not call debug hooks on trace, because we might be in a non-_FAIL
* builtin. See bug 481444.
*/
if (cx->debugHooks->objectHook && !JS_ON_TRACE(cx)) {
JS_KEEP_ATOMS(cx->runtime);
cx->debugHooks->objectHook(cx, obj, JS_TRUE,
cx->debugHooks->objectHookData);