Bug 466433 - Crash [@ CallQueryInterface<nsIFrame,nsIScrollableViewProvider>] with MozMousePixelScroll event and removing window, r+sr=roc
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -2909,17 +2909,19 @@ nsEventStateManager::PostHandleEvent(nsP
if (msEvent->scrollFlags & nsMouseScrollEvent::kIsHorizontal) {
mLastLineScrollConsumedX = (nsEventStatus_eConsumeNoDefault == *aStatus);
} else if (msEvent->scrollFlags & nsMouseScrollEvent::kIsVertical) {
mLastLineScrollConsumedY = (nsEventStatus_eConsumeNoDefault == *aStatus);
}
if (!(msEvent->scrollFlags & nsMouseScrollEvent::kHasPixels)) {
// No generated pixel scroll event will follow.
// Create and send a pixel scroll DOM event now.
+ nsWeakFrame weakFrame(aTargetFrame);
SendPixelScrollEvent(aTargetFrame, msEvent, presContext, aStatus);
+ NS_ENSURE_STATE(weakFrame.IsAlive());
}
}
if (*aStatus != nsEventStatus_eConsumeNoDefault) {
// Build the preference keys, based on the event properties.
NS_NAMED_LITERAL_CSTRING(actionslot, ".action");
NS_NAMED_LITERAL_CSTRING(sysnumlinesslot, ".sysnumlines");