Landing fix for bug 410010. Make exceptions thrown during even handling always get reported once the event handler has run. Patch by mrbkap@gmail.com, r+sr=jst@mozilla.org

This commit is contained in:
jst@mozilla.org 2008-02-19 14:38:34 -08:00
Родитель 24b7a300be
Коммит cc03405456
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -1936,7 +1936,9 @@ nsJSContext::CallEventHandler(nsISupports* aTarget, void *aScope, void *aHandler
// to avoid dropping JS exceptions in case we got here through
// nested calls through XPConnect.
nsContentUtils::NotifyXPCIfExceptionPending(mContext);
if (JS_IsExceptionPending(mContext)) {
JS_ReportPendingException(mContext);
}
// Don't pass back results from failed calls.
rval = JSVAL_VOID;