зеркало из https://github.com/mozilla/pjs.git
Fix for bug 74482(Calling top.window.close() doe not work)
Work done by Nikolay Igotti and me r=beard, sr=brendan, a =asa
This commit is contained in:
Родитель
3e788efb44
Коммит
e95583d1e3
|
@ -491,7 +491,7 @@ enter_js_from_java_impl(JNIEnv *jEnv, char **errp,
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_STATIC_DLL_CALLBACK(void)
|
JS_STATIC_DLL_CALLBACK(void)
|
||||||
exit_js_impl(JNIEnv *jEnv)
|
exit_js_impl(JNIEnv *jEnv, JSContext *cx)
|
||||||
{
|
{
|
||||||
//TODO:
|
//TODO:
|
||||||
//LM_UnlockJS();
|
//LM_UnlockJS();
|
||||||
|
@ -518,7 +518,18 @@ exit_js_impl(JNIEnv *jEnv)
|
||||||
delete top;
|
delete top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// The main idea is to execute terminate function if have any;
|
||||||
|
if (cx)
|
||||||
|
{
|
||||||
|
nsISupports* supports = NS_REINTERPRET_CAST(nsIScriptContext*,
|
||||||
|
JS_GetContextPrivate(cx));
|
||||||
|
nsCOMPtr<nsIScriptContext> scriptContext = do_QueryInterface(supports);
|
||||||
|
|
||||||
|
if (scriptContext)
|
||||||
|
{
|
||||||
|
scriptContext->ScriptEvaluated(PR_TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче