Add location in the context where we can hold the recorder script and make sure the GC traces it.

This commit is contained in:
Andreas Gal 2008-06-03 17:14:54 -07:00
parent 8b6c4d02c6
commit c93d0c8e08
2 changed files with 6 additions and 0 deletions

View File

@ -813,6 +813,10 @@ struct JSContext {
/* Debug hooks associated with the current context. */
JSDebugHooks *debugHooks;
/* The recorder.js script is loaded into the context as needed. */
JSScript *recorderScript;
JSObject *recorderScriptObject;
};
#ifdef JS_THREADSAFE

View File

@ -2858,6 +2858,8 @@ js_TraceContext(JSTracer *trc, JSContext *acx)
if (acx->sharpObjectMap.depth > 0)
js_TraceSharpMap(trc, &acx->sharpObjectMap);
if (acx->recorderScriptObject)
JS_CALL_OBJECT_TRACER(trc, acx->recorderScriptObject, "recorderScriptObject");
}
void