diff --git a/content/events/src/nsEventListenerManager.cpp b/content/events/src/nsEventListenerManager.cpp index f0c3a692259..b649ecfa48c 100644 --- a/content/events/src/nsEventListenerManager.cpp +++ b/content/events/src/nsEventListenerManager.cpp @@ -992,7 +992,7 @@ nsEventListenerManager::HandleEventInternal(nsPresContext* aPresContext, if (NS_FAILED(HandleEventSubType(ls, ls->mListener, *aDOMEvent, aCurrentTarget, aFlags, aPusher))) { - aEvent->flags |= NS_EVENT_FLAG_EXCEPTION_THROWN; + aEvent->mFlags.mExceptionHasBeenRisen = true; } } } diff --git a/dom/indexedDB/AsyncConnectionHelper.cpp b/dom/indexedDB/AsyncConnectionHelper.cpp index c0183198c26..157d99e92b5 100644 --- a/dom/indexedDB/AsyncConnectionHelper.cpp +++ b/dom/indexedDB/AsyncConnectionHelper.cpp @@ -449,7 +449,7 @@ AsyncConnectionHelper::OnSuccess() mTransaction->IsAborted(), "How else can this be closed?!"); - if ((internalEvent->flags & NS_EVENT_FLAG_EXCEPTION_THROWN) && + if (internalEvent->mFlags.mExceptionHasBeenRisen && mTransaction && mTransaction->IsOpen()) { rv = mTransaction->Abort(NS_ERROR_DOM_INDEXEDDB_ABORT_ERR); @@ -485,7 +485,7 @@ AsyncConnectionHelper::OnError() nsEvent* internalEvent = event->GetInternalNSEvent(); NS_ASSERTION(internalEvent, "This should never be null!"); - if ((internalEvent->flags & NS_EVENT_FLAG_EXCEPTION_THROWN) && + if (internalEvent->mFlags.mExceptionHasBeenRisen && mTransaction && mTransaction->IsOpen() && NS_FAILED(mTransaction->Abort(NS_ERROR_DOM_INDEXEDDB_ABORT_ERR))) { diff --git a/widget/nsGUIEvent.h b/widget/nsGUIEvent.h index 672a98d6261..88e37cec273 100644 --- a/widget/nsGUIEvent.h +++ b/widget/nsGUIEvent.h @@ -120,8 +120,6 @@ enum nsEventStructType { #define NS_PRIV_EVENT_UNTRUSTED_PERMITTED 0x8000 -#define NS_EVENT_FLAG_EXCEPTION_THROWN 0x10000 - #define NS_EVENT_RETARGET_TO_NON_NATIVE_ANONYMOUS 0x40000 #define NS_EVENT_FLAG_DONT_FORWARD_CROSS_PROCESS 0x100000 @@ -539,6 +537,9 @@ public: // If mIsSynthesizedForTests is true, the event has been synthesized for // automated tests or something hacky approach of an add-on. bool mIsSynthesizedForTests : 1; + // If mExceptionHasBeenRisen is true, one of the event handlers has risen an + // exception. + bool mExceptionHasBeenRisen : 1; // If the event is being handled in target phase, returns true. bool InTargetPhase() const