зеркало из https://github.com/mozilla/gecko-dev.git
bulletproofing to prevent the crash I reported in bug #13007. assert is better than a crash any day.
This commit is contained in:
Родитель
8795a355d4
Коммит
56873de822
|
@ -108,12 +108,19 @@ nsEventStateManager::PreHandleEvent(nsIPresContext& aPresContext,
|
|||
NS_IF_RELEASE(mCurrentTargetContent);
|
||||
|
||||
nsFrameState state;
|
||||
|
||||
NS_ASSERTION(mCurrentTarget, "mCurrentTarget is null. this should not happen. see bug #13007");
|
||||
if (!mCurrentTarget) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
mCurrentTarget->GetFrameState(&state);
|
||||
state |= NS_FRAME_EXTERNAL_REFERENCE;
|
||||
mCurrentTarget->SetFrameState(state);
|
||||
|
||||
aStatus = nsEventStatus_eIgnore;
|
||||
|
||||
NS_ASSERTION(aEvent, "aEvent is null. this should never happen");
|
||||
if (!aEvent) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
switch (aEvent->message) {
|
||||
case NS_MOUSE_LEFT_BUTTON_DOWN:
|
||||
BeginTrackingDragGesture ( aEvent, aTargetFrame );
|
||||
|
|
|
@ -108,12 +108,19 @@ nsEventStateManager::PreHandleEvent(nsIPresContext& aPresContext,
|
|||
NS_IF_RELEASE(mCurrentTargetContent);
|
||||
|
||||
nsFrameState state;
|
||||
|
||||
NS_ASSERTION(mCurrentTarget, "mCurrentTarget is null. this should not happen. see bug #13007");
|
||||
if (!mCurrentTarget) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
mCurrentTarget->GetFrameState(&state);
|
||||
state |= NS_FRAME_EXTERNAL_REFERENCE;
|
||||
mCurrentTarget->SetFrameState(state);
|
||||
|
||||
aStatus = nsEventStatus_eIgnore;
|
||||
|
||||
NS_ASSERTION(aEvent, "aEvent is null. this should never happen");
|
||||
if (!aEvent) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
switch (aEvent->message) {
|
||||
case NS_MOUSE_LEFT_BUTTON_DOWN:
|
||||
BeginTrackingDragGesture ( aEvent, aTargetFrame );
|
||||
|
|
Загрузка…
Ссылка в новой задаче