Loading
Bug 2058661 - Clear the drag source window's GdkDragContext pointer...
Bug 2058661 - Clear the drag source window's GdkDragContext pointer synchronously. r=stransky a=RyanVM DONTBUILD gtk_drag_begin_with_coordinates() returns a borrowed context: GtkDragSourceInfo holds the only reference, and gtk_drag_source_info_destroy() drops it as soon as the drag-end handler returns. nsWindow::mSourceDragContext was cleared only from an async runnable (EndDragSessionMainThread -> EndDragSessionImpl), so between GTK's unref and that runnable the pointer dangled, and nsWindow::OnUnmap() calls gtk_drag_cancel() on it. Content can land an unmap in that window with a window.close() task queued before the drag ended. EndDragSessionImpl keeps its own clear for drags torn down without a drag-end. Original Revision: https://phabricator.services.mozilla.com/D315509 Differential Revision: https://phabricator.services.mozilla.com/D319278