diff --git a/js/jsd/jsd_xpc.cpp b/js/jsd/jsd_xpc.cpp index 97db7016e79c..a09c1da649c8 100644 --- a/js/jsd/jsd_xpc.cpp +++ b/js/jsd/jsd_xpc.cpp @@ -464,6 +464,15 @@ jsds_FilterHook (JSDContext *jsdc, JSDThreadState *state) JS_STATIC_DLL_CALLBACK (void) jsds_NotifyPendingDeadScripts (JSContext *cx) { + /* Bug 411249, we can't drop the script hook. + * Even if we could drop the script hook, jsds_GCCallbackProc + * is never cleared, so it would call us anyway. + * + * If there's no gJsds, then we can't do anything. + */ + if (!gJsds) + return; + nsCOMPtr hook = 0; gJsds->GetScriptHook (getter_AddRefs(hook));