Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1449)

Unified Diff: Source/core/page/DragController.cpp

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased upto r183571 Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/page/DragController.cpp
diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp
index 9074fab11af50a6384c176e05131603e17b34328..12b470f98210028e51a33acc707826b08f72d888 100644
--- a/Source/core/page/DragController.cpp
+++ b/Source/core/page/DragController.cpp
@@ -216,7 +216,8 @@ void DragController::dragExited(DragData* dragData)
ASSERT(dragData);
LocalFrame* mainFrame = m_page->deprecatedLocalMainFrame();
- if (RefPtr<FrameView> v = mainFrame->view()) {
+ RefPtrWillBeRawPtr<FrameView> frameView(mainFrame->view());
+ if (frameView) {
DataTransferAccessPolicy policy = (!m_documentUnderMouse || m_documentUnderMouse->securityOrigin()->isLocal()) ? DataTransferReadable : DataTransferTypesReadable;
RefPtrWillBeRawPtr<DataTransfer> dataTransfer = createDraggingDataTransfer(policy, dragData);
dataTransfer->setSourceOperation(dragData->draggingSourceOperationMask());
@@ -353,7 +354,7 @@ bool DragController::tryDocumentDrag(DragData* dragData, DragDestinationAction a
// It's unclear why this check is after tryDHTMLDrag.
// We send drag events in tryDHTMLDrag and that may be the reason.
- RefPtr<FrameView> frameView = m_documentUnderMouse->view();
+ RefPtrWillBeRawPtr<FrameView> frameView = m_documentUnderMouse->view();
if (!frameView)
return false;
@@ -594,7 +595,7 @@ bool DragController::tryDHTMLDrag(DragData* dragData, DragOperation& operation)
if (!mainFrame->view())
return false;
- RefPtr<FrameView> viewProtector(mainFrame->view());
+ RefPtrWillBeRawPtr<FrameView> viewProtector(mainFrame->view());
DataTransferAccessPolicy policy = m_documentUnderMouse->securityOrigin()->isLocal() ? DataTransferReadable : DataTransferTypesReadable;
RefPtrWillBeRawPtr<DataTransfer> dataTransfer = createDraggingDataTransfer(policy, dragData);
DragOperation srcOpMask = dragData->draggingSourceOperationMask();
@@ -946,7 +947,7 @@ void DragController::doSystemDrag(DragImage* image, const IntPoint& dragLocation
m_dragInitiator = frame->document();
// Protect this frame and view, as a load may occur mid drag and attempt to unload this frame
RefPtrWillBeRawPtr<LocalFrame> mainFrame = m_page->deprecatedLocalMainFrame();
- RefPtr<FrameView> mainFrameView = mainFrame->view();
+ RefPtrWillBeRawPtr<FrameView> mainFrameView = mainFrame->view();
m_client->startDrag(image, mainFrameView->rootViewToContents(frame->view()->contentsToRootView(dragLocation)),
mainFrameView->rootViewToContents(frame->view()->contentsToRootView(eventPos)), dataTransfer, frame, forLink);

Powered by Google App Engine
This is Rietveld 408576698