зеркало из https://github.com/mozilla/gecko-dev.git
Clear the pending exception before dispatching any events and potentially running JS on a context that already has an exception thrown. bug 329046, r=brendan sr=jst
This commit is contained in:
Родитель
dd66394dd2
Коммит
d2ec11391a
|
@ -169,6 +169,10 @@ NS_ScriptErrorReporter(JSContext *cx,
|
|||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
|
||||
// Note: we must do this before running any more code on cx (if cx is the
|
||||
// dynamic script context).
|
||||
::JS_ClearPendingException(cx);
|
||||
|
||||
if (context) {
|
||||
nsCOMPtr<nsPIDOMWindow> win(do_QueryInterface(context->GetGlobalObject()));
|
||||
|
||||
|
@ -320,9 +324,6 @@ NS_ScriptErrorReporter(JSContext *cx,
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// XXX do we really want to be doing this?
|
||||
::JS_ClearPendingException(cx);
|
||||
}
|
||||
|
||||
JS_STATIC_DLL_CALLBACK(JSBool)
|
||||
|
|
Загрузка…
Ссылка в новой задаче