Bug 216254

Summary: [GTK] AcceleratedBackingStoreWayland might erroneously try to use SHM with older wpebackend-fdo
Product: WebKit Reporter: Mike Gorse <mgorse>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply, cgarcia, darin, mgorse
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: Linux   
Attachments:
Description Flags
Patch.
none
Patch.
aperez: review-, aperez: commit-queue-
Patch. none

Description Mike Gorse 2020-09-07 15:10:03 PDT
TryInitializeSHM has a wpebackend-fdo version check, but, for versions older than 1.7.0, it does the wrong thing and acts as though it has successfully initialized. Epiphany is currently coredumping with the openSUSE GNOME:Next repository (using webkitgtk 2.29.92), and I suspect that this is the reason.
Comment 1 Mike Gorse 2020-09-07 15:14:12 PDT
Created attachment 408199 [details]
Patch.
Comment 2 Darin Adler 2020-09-07 16:01:22 PDT
Comment on attachment 408199 [details]
Patch.

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

> Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:140
> +    return false;

We’d like to structure the #if so there is not dead code after a return.

So the code after the #endif should be moved before the #else.
Comment 3 Mike Gorse 2020-09-07 16:32:41 PDT
Created attachment 408202 [details]
Patch.
Comment 4 Adrian Perez 2020-09-08 00:58:43 PDT
Comment on attachment 408202 [details]
Patch.

Hello! Thanks for the patch, Michael. Could you please move the “return”
around as suggested by Darin? Other than that and adding the [WPE] tag
to the bug description, the change looks good =)

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

> Source/WebKit/ChangeLog:3
> +        AcceleratedBackingStoreWayland might erroneously try to use SHM with older wpebackend-fdo

Let's also add the [WPE] tag to the bug description :)
Comment 5 Carlos Garcia Campos 2020-09-08 01:12:21 PDT
This is a gtk bug, not WPE
Comment 6 Mike Gorse 2020-09-08 07:26:02 PDT
Created attachment 408227 [details]
Patch.

Updated ChangeLog entry. I believe I have also done what Darin requested in terms of the return value.
Comment 7 EWS 2020-09-08 08:25:10 PDT
Committed r266726: <https://trac.webkit.org/changeset/266726>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 408227 [details].