Don't set the "exception pending" boolean on the XPCCallContext if we actually

set the exception on some other unrelated JSContext.  Bug 328851, r=jst, sr=brendan
This commit is contained in:
bzbarsky%mit.edu 2006-03-01 03:54:15 +00:00
Родитель d980d3eddb
Коммит c775a03003
1 изменённых файлов: 8 добавлений и 1 удалений

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

@ -2487,7 +2487,14 @@ nsContentUtils::NotifyXPCIfExceptionPending(JSContext* aCx)
nsCOMPtr<nsIXPCNativeCallContext> nccx;
XPConnect()->GetCurrentNativeCallContext(getter_AddRefs(nccx));
if (nccx) {
nccx->SetExceptionWasThrown(PR_TRUE);
// Check to make sure that the JSContext that nccx will mess with is the
// same as the JSContext we've set an exception on. If they're not the
// same, don't mess with nccx.
JSContext* cx;
nccx->GetJSContext(&cx);
if (cx == aCx) {
nccx->SetExceptionWasThrown(PR_TRUE);
}
}
}