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

Unified Diff: content/browser/web_contents/web_drag_dest_gtk.cc

Issue 10782036: Merge 146016 - Fix a renderer crash when dragging quickly over tab contents. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_drag_dest_gtk.cc
===================================================================
--- content/browser/web_contents/web_drag_dest_gtk.cc (revision 147031)
+++ content/browser/web_contents/web_drag_dest_gtk.cc (working copy)
@@ -91,7 +91,6 @@
void WebDragDestGtk::DragLeave() {
GetRenderViewHost()->DragTargetDragLeave();
-
if (delegate())
delegate()->OnDragLeave();
@@ -270,6 +269,12 @@
// as an enter.
context_ = NULL;
+ // Sometimes we get a drag-leave event before getting a drag-data-received
+ // event. In that case, we don't want to bother the renderer with a
+ // DragLeave event.
+ if (data_requests_ != 0)
+ return;
+
// When GTK sends us a drag-drop signal, it is shortly (and synchronously)
// preceded by a drag-leave. The renderer doesn't like getting the signals
// in this order so delay telling it about the drag-leave till we are sure
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698