Bug 216254 - [GTK] AcceleratedBackingStoreWayland might erroneously try to use SHM with older wpebackend-fdo
Summary: [GTK] AcceleratedBackingStoreWayland might erroneously try to use SHM with ol...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: All Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-07 15:10 PDT by Mike Gorse
Modified: 2020-09-08 08:25 PDT (History)
5 users (show)

See Also:


Attachments
Patch. (1.17 KB, patch)
2020-09-07 15:14 PDT, Mike Gorse
no flags Details | Formatted Diff | Diff
Patch. (1.23 KB, patch)
2020-09-07 16:32 PDT, Mike Gorse
aperez: review-
aperez: commit-queue-
Details | Formatted Diff | Diff
Patch. (1.30 KB, patch)
2020-09-08 07:26 PDT, Mike Gorse
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].