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

Unified Diff: webkit/glue/webview_impl.cc

Issue 159040: Fix another d&d crash that happens when the tab contents (Closed)
Patch Set: revise comment Created 11 years, 5 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
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webview_impl.cc
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 53a5f228d11b790e22e2c5b2dedba836bfd9074c..0556ac8e80b79b462ccc9c435630195bff37bf24 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(
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698