summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 17:43:06 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 17:43:06 +0000
commit28119ec7b28e0ab1ac4f3e7a1a59ff34beeb98d1 (patch)
treead61dbf9396d03ee0690ead135c83b8477b313f9 /webkit/glue
parent55b4a69202507b6950190ea06273b497e174fe01 (diff)
downloadchromium_src-28119ec7b28e0ab1ac4f3e7a1a59ff34beeb98d1.zip
chromium_src-28119ec7b28e0ab1ac4f3e7a1a59ff34beeb98d1.tar.gz
chromium_src-28119ec7b28e0ab1ac4f3e7a1a59ff34beeb98d1.tar.bz2
Fix another d&d crash that happens when the tab contents
is swapped out while a drag is happening. Since the tab contents is swapped out, our RVH that the drag started on is no longer valid. Simply null out the pointer and no longer try to send feedback to the drag source. This allows the user to continue the drag even though the source RVH is gone. BUG=16073 Review URL: http://codereview.chromium.org/159040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webview_impl.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 53a5f22..0556ac8 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -1588,9 +1588,12 @@ void WebViewImpl::DragSourceMovedTo(
}
void WebViewImpl::DragSourceSystemDragEnded() {
- page_->dragController()->dragEnded();
- DCHECK(doing_drag_and_drop_);
- doing_drag_and_drop_ = false;
+ // It's possible for us to get this callback while not doing a drag if
+ // it's from a previous page that got unloaded.
+ if (doing_drag_and_drop_) {
+ page_->dragController()->dragEnded();
+ doing_drag_and_drop_ = false;
+ }
}
bool WebViewImpl::DragTargetDragEnter(