WebKit Bugzilla
Attachment 362110 Details for
Bug 194698
: [GTK] Crash while filling selection data during drag and drop
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
wk-gtk-dnd-crash.diff (text/plain), 2.74 KB, created by
Carlos Garcia Campos
on 2019-02-15 04:19:01 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2019-02-15 04:19:01 PST
Size:
2.74 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 55d39fd77de..6d0577786e9 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2019-02-15 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] Crash while filling selection data during drag and drop >+ https://bugs.webkit.org/show_bug.cgi?id=194698 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ I can't reproduce this, but it seems that m_draggingSelectionData is nullptr in fillDragData(). That can happen >+ when startDrag cancels a previous DND operation, because the new m_draggingSelectionData is set before the >+ current DND operation is cancelled, which sets it to nullptr. >+ >+ * UIProcess/gtk/DragAndDropHandler.cpp: >+ (WebKit::DragAndDropHandler::startDrag): Finish the previous operation before setting m_draggingSelectionData. >+ > 2019-02-14 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Update OptionsGTK.cmake and NEWS for 2.23.90 release >diff --git a/Source/WebKit/UIProcess/gtk/DragAndDropHandler.cpp b/Source/WebKit/UIProcess/gtk/DragAndDropHandler.cpp >index 75a1bb6fb29..c29c3fa72a9 100644 >--- a/Source/WebKit/UIProcess/gtk/DragAndDropHandler.cpp >+++ b/Source/WebKit/UIProcess/gtk/DragAndDropHandler.cpp >@@ -107,6 +107,14 @@ static inline DragOperation gdkDragActionToDragOperation(GdkDragAction gdkAction > void DragAndDropHandler::startDrag(Ref<SelectionData>&& selection, DragOperation dragOperation, RefPtr<ShareableBitmap>&& dragImage) > { > #if GTK_CHECK_VERSION(3, 16, 0) >+ // WebCore::EventHandler does not support more than one DnD operation at the same time for >+ // a given page, so we should cancel any previous operation whose context we might have >+ // stored, should we receive a new startDrag event before finishing a previous DnD operation. >+ if (m_dragContext) { >+ gtk_drag_cancel(m_dragContext.get()); >+ m_dragContext = nullptr; >+ } >+ > m_draggingSelectionData = WTFMove(selection); > GRefPtr<GtkTargetList> targetList = PasteboardHelper::singleton().targetListForSelectionData(*m_draggingSelectionData); > #else >@@ -119,11 +127,6 @@ void DragAndDropHandler::startDrag(Ref<SelectionData>&& selection, DragOperation > GDK_BUTTON_PRIMARY, currentEvent.get()); > > #if GTK_CHECK_VERSION(3, 16, 0) >- // WebCore::EventHandler does not support more than one DnD operation at the same time for >- // a given page, so we should cancel any previous operation whose context we might have >- // stored, should we receive a new startDrag event before finishing a previous DnD operation. >- if (m_dragContext) >- gtk_drag_cancel(m_dragContext.get()); > m_dragContext = context; > #else > // We don't have gtk_drag_cancel() in GTK+ < 3.16, so we use the old code.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mcatanzaro
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194698
: 362110