[Webkit-unassigned] [Bug 163011] [GTK] UIProcess crashes when using Japanese IM

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 6 08:24:22 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=163011

Carlos Garcia Campos <cgarcia at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #290822|commit-queue?               |commit-queue-
              Flags|                            |

--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 290822
  --> https://bugs.webkit.org/attachment.cgi?id=290822
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=290822&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:709
> +    // We need to copy the event as otherwise it could be destroyed before we
> +    // reach the lambda body.

This could be a single line.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:710
> +    GdkEvent* event = gdk_event_copy(reinterpret_cast<GdkEvent*>(keyEvent));

GUniquePtr<GdkEvent> event(gdk_event_copy(reinterpret_cast<GdkEvent*>(keyEvent)));

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:711
> +    priv->inputMethodFilter.filterKeyEvent(&event->key, [priv, event](const WebCore::CompositionResults& compositionResults, InputMethodFilter::EventFakedForComposition faked) {

[priv, event = WTFMove(event)]

With this, the lambda takes the ownership and you don't need to call gdk_event_free(). Maybe it's better to call this keyEvent and then you don't have to rename all other cases.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:733
> +    // We need to copy the event as otherwise it could be destroyed before we
> +    // reach the lambda body.
> +    GdkEvent* event = gdk_event_copy(reinterpret_cast<GdkEvent*>(keyEvent));
> +    priv->inputMethodFilter.filterKeyEvent(&event->key, [priv, event](const WebCore::CompositionResults& compositionResults, InputMethodFilter::EventFakedForComposition faked) {

Ditto.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161006/0a0111f8/attachment.html>


More information about the webkit-unassigned mailing list