summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/page/DragController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/page/DragController.cpp')
-rw-r--r--Source/WebCore/page/DragController.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/WebCore/page/DragController.cpp b/Source/WebCore/page/DragController.cpp
index c4cbb67ef..7a874db56 100644
--- a/Source/WebCore/page/DragController.cpp
+++ b/Source/WebCore/page/DragController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2009, 2010, 2013, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2009-2010, 2013, 2015-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -432,6 +432,7 @@ DragOperation DragController::operationForLoad(DragData& dragData)
static bool setSelectionToDragCaret(Frame* frame, VisibleSelection& dragCaret, RefPtr<Range>& range, const IntPoint& point)
{
+ Ref<Frame> protector(*frame);
frame->selection().setSelection(dragCaret);
if (frame->selection().selection().isNone()) {
dragCaret = frame->visiblePositionForPoint(point);
@@ -752,6 +753,7 @@ bool DragController::startDrag(Frame& src, const DragState& state, DragOperation
if (!src.view() || !src.contentRenderer() || !state.source)
return false;
+ Ref<Frame> protector(src);
HitTestResult hitTestResult = src.eventHandler().hitTestResultAtPoint(dragOrigin, HitTestRequest::ReadOnly | HitTestRequest::Active);
// FIXME(136836): Investigate whether all elements should use the containsIncludingShadowDOM() path here.