Title: [124588] trunk/Source/WebCore
- Revision
- 124588
- Author
- [email protected]
- Date
- 2012-08-03 03:14:44 -0700 (Fri, 03 Aug 2012)
Log Message
WebCore::DragController::cleanupAfterSystemDrag should null-check page
https://bugs.webkit.org/show_bug.cgi?id=61815
Reviewed by Eric Seidel.
* page/DragController.cpp:
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::doSystemDrag):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (124587 => 124588)
--- trunk/Source/WebCore/ChangeLog 2012-08-03 10:02:37 UTC (rev 124587)
+++ trunk/Source/WebCore/ChangeLog 2012-08-03 10:14:44 UTC (rev 124588)
@@ -1,3 +1,14 @@
+2012-08-03 Adam Barth <[email protected]>
+
+ WebCore::DragController::cleanupAfterSystemDrag should null-check page
+ https://bugs.webkit.org/show_bug.cgi?id=61815
+
+ Reviewed by Eric Seidel.
+
+ * page/DragController.cpp:
+ (WebCore::DragController::dragEnteredOrUpdated):
+ (WebCore::DragController::doSystemDrag):
+
2012-08-03 Sergio Carlos Morales Angeles <[email protected]>
Delete text from password does nothing.
Modified: trunk/Source/WebCore/page/DragController.cpp (124587 => 124588)
--- trunk/Source/WebCore/page/DragController.cpp 2012-08-03 10:02:37 UTC (rev 124587)
+++ trunk/Source/WebCore/page/DragController.cpp 2012-08-03 10:14:44 UTC (rev 124588)
@@ -254,7 +254,7 @@
DragSession DragController::dragEnteredOrUpdated(DragData* dragData)
{
ASSERT(dragData);
- ASSERT(m_page->mainFrame()); // It is not possible in Mac WebKit to have a Page without a mainFrame()
+ ASSERT(m_page->mainFrame());
mouseMovedIntoDocument(m_page->mainFrame()->documentAtPoint(dragData->clientPosition()));
m_dragDestinationAction = m_client->actionMaskForDrag(dragData);
@@ -892,6 +892,9 @@
RefPtr<FrameView> viewProtector = frameProtector->view();
m_client->startDrag(image, viewProtector->rootViewToContents(frame->view()->contentsToRootView(dragLoc)),
viewProtector->rootViewToContents(frame->view()->contentsToRootView(eventPos)), clipboard, frameProtector.get(), forLink);
+ // DragClient::startDrag can cause our Page to dispear, deallocating |this|.
+ if (!frameProtector->page())
+ return;
cleanupAfterSystemDrag();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes