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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user