Don't fire window.onerror for strict JS warnings. Bug 220603 (and bug 63672

and company), patch by brendan, r=jst, sr=bzbarsky
This commit is contained in:
bzbarsky%mit.edu 2003-10-16 17:54:24 +00:00
parent 3c196ae18d
commit 627dcc5a9d

View File

@ -177,7 +177,7 @@ NS_ScriptErrorReporter(JSContext *cx,
//send error event first, then proceed
nsCOMPtr<nsIDocShell> docShell;
globalObject->GetDocShell(getter_AddRefs(docShell));
if (docShell) {
if (docShell && !JSREPORT_IS_WARNING(report->flags)) {
static PRInt32 errorDepth; // Recursion prevention
errorDepth++;