Title: [264016] trunk/Source/WebKit
Revision
264016
Author
[email protected]
Date
2020-07-07 06:57:38 -0700 (Tue, 07 Jul 2020)

Log Message

REGRESSION(r262680): [GTK] Crash in WebKit::DropTarget::didPerformAction
https://bugs.webkit.org/show_bug.cgi?id=213885

Reviewed by Michael Catanzaro.

Just compare if new operation is the same as the current one, the == operator of Optional already takes care of
values being nullopt.

* UIProcess/API/gtk/DropTargetGtk3.cpp:
(WebKit::DropTarget::didPerformAction):
* UIProcess/API/gtk/DropTargetGtk4.cpp:
(WebKit::DropTarget::didPerformAction):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (264015 => 264016)


--- trunk/Source/WebKit/ChangeLog	2020-07-07 13:56:37 UTC (rev 264015)
+++ trunk/Source/WebKit/ChangeLog	2020-07-07 13:57:38 UTC (rev 264016)
@@ -1,3 +1,18 @@
+2020-07-07  Carlos Garcia Campos  <[email protected]>
+
+        REGRESSION(r262680): [GTK] Crash in WebKit::DropTarget::didPerformAction
+        https://bugs.webkit.org/show_bug.cgi?id=213885
+
+        Reviewed by Michael Catanzaro.
+
+        Just compare if new operation is the same as the current one, the == operator of Optional already takes care of
+        values being nullopt.
+
+        * UIProcess/API/gtk/DropTargetGtk3.cpp:
+        (WebKit::DropTarget::didPerformAction):
+        * UIProcess/API/gtk/DropTargetGtk4.cpp:
+        (WebKit::DropTarget::didPerformAction):
+
 2020-07-07  Tomoki Imai  <[email protected]>
 
         [Win] Implement Pasteboard::writeCustomData for Web Inspector Console tab

Modified: trunk/Source/WebKit/UIProcess/API/gtk/DropTargetGtk3.cpp (264015 => 264016)


--- trunk/Source/WebKit/UIProcess/API/gtk/DropTargetGtk3.cpp	2020-07-07 13:56:37 UTC (rev 264015)
+++ trunk/Source/WebKit/UIProcess/API/gtk/DropTargetGtk3.cpp	2020-07-07 13:57:38 UTC (rev 264016)
@@ -217,7 +217,7 @@
     ASSERT(page);
 
     auto operation = page->currentDragOperation();
-    if ((!operation && !m_operation) || *operation == *m_operation)
+    if (operation == m_operation)
         return;
 
     m_operation = operation;

Modified: trunk/Source/WebKit/UIProcess/API/gtk/DropTargetGtk4.cpp (264015 => 264016)


--- trunk/Source/WebKit/UIProcess/API/gtk/DropTargetGtk4.cpp	2020-07-07 13:56:37 UTC (rev 264015)
+++ trunk/Source/WebKit/UIProcess/API/gtk/DropTargetGtk4.cpp	2020-07-07 13:57:38 UTC (rev 264016)
@@ -273,7 +273,7 @@
     ASSERT(page);
 
     auto operation = page->currentDragOperation();
-    if ((!operation && !m_operation) || operation == m_operation)
+    if (operation == m_operation)
         return;
 
     m_operation = operation;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to