I think this is actually a GTK+ bug (I'll file a bug report), but in Wayland gdk_keymap_get_entries_for_keyval() can return TRUE with n_keys=0. We have several places in WebKit where we just check the return value of gdk_keymap_get_entries_for_keyval() and then use the returned array to get the first position assuming it has at least one item. This has always worked in X11 because the GDK X11 backend does the right thing, but it's crashing in Wayland now. It should be fixed in GTK+ but in the meantime it's easy to workaround by also checking n_keys > 0.
Created attachment 319454 [details] Patch
Created attachment 319455 [details] Patch
Committed r221419: <http://trac.webkit.org/changeset/221419>