From 1f3773999efece49005fca7304f0fec29e6b3648 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Thu, 1 Jun 2006 21:51:07 +0000 Subject: [PATCH] Report exceptions immediately since constructors and destructors are not called from JS and don't propagate the error status. b=339022 r=bzbarsky sr=brendan git-svn-id: svn://10.0.0.236/trunk@198828 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/xbl/src/nsXBLProtoImplMethod.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mozilla/content/xbl/src/nsXBLProtoImplMethod.cpp b/mozilla/content/xbl/src/nsXBLProtoImplMethod.cpp index 5b3f971b21e..e8cf3faaf55 100644 --- a/mozilla/content/xbl/src/nsXBLProtoImplMethod.cpp +++ b/mozilla/content/xbl/src/nsXBLProtoImplMethod.cpp @@ -345,10 +345,9 @@ nsXBLProtoImplAnonymousMethod::Execute(nsIContent* aBoundElement) } if (!ok) { - // Tell XPConnect about any pending exceptions. This is needed - // to avoid dropping JS exceptions in case we got here through - // nested calls through XPConnect. - nsContentUtils::NotifyXPCIfExceptionPending(cx); + // If a constructor or destructor threw an exception, it doesn't + // stop anything else. We just report it. + ::JS_ReportPendingException(cx); return NS_ERROR_FAILURE; }