зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 76541, r=danm, sr=brendan, a=asa@mozilla.org. Suspending and Releasing JS requests during Alert and Confirm dialog creation.
This commit is contained in:
Родитель
bc2b832d37
Коммит
f4f5b67ca5
|
@ -2532,7 +2532,7 @@ nsInstall::Confirm(nsString& string, PRBool* aReturn)
|
|||
|
||||
PRUnichar *title = GetTranslatedString(NS_ConvertASCIItoUCS2("Confirm").get());
|
||||
|
||||
return dialog->Confirm(mParent, title, string.GetUnicode(), aReturn);
|
||||
return proxiedDialog->Confirm(mParent, title, string.GetUnicode(), aReturn);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1631,7 +1631,13 @@ InstallAlert(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
|||
// public int InstallAlert (String aComment);
|
||||
|
||||
ConvertJSValToStr(b0, cx, argv[0]);
|
||||
|
||||
jsrefcount saveDepth = JS_SuspendRequest(cx);//Need to suspend use of thread or deadlock occurs
|
||||
|
||||
nativeThis->Alert(b0);
|
||||
|
||||
JS_ResumeRequest(cx, saveDepth);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1665,8 +1671,13 @@ InstallConfirm(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rva
|
|||
// public int InstallConfirm (String aComment);
|
||||
|
||||
ConvertJSValToStr(b0, cx, argv[0]);
|
||||
|
||||
jsrefcount saveDepth = JS_SuspendRequest(cx);//Need to suspend use of thread or deadlock occurs
|
||||
|
||||
nativeThis->Confirm(b0, &nativeRet);
|
||||
|
||||
JS_ResumeRequest(cx, saveDepth);
|
||||
|
||||
*rval = INT_TO_JSVAL(nativeRet);
|
||||
}
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче