Bug 227344

Summary: [GTK][WPE] Check GApplication has a valid ID before trying to create the flatpack info
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, mcatanzaro
Priority: P2 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
mcatanzaro: review-
Patch mcatanzaro: review+, mcatanzaro: commit-queue-

Description Carlos Garcia Campos 2021-06-24 02:43:53 PDT
(MiniBrowser:49675): GLib-CRITICAL **: 11:38:50.163: g_key_file_set_string: assertion 'string != NULL' failed
Comment 1 Carlos Garcia Campos 2021-06-24 02:45:22 PDT
Created attachment 432144 [details]
Patch
Comment 2 Carlos Garcia Campos 2021-06-24 02:46:10 PDT
Created attachment 432145 [details]
Patch
Comment 3 Michael Catanzaro 2021-06-24 13:40:14 PDT
Comment on attachment 432145 [details]
Patch

Patrick noticed that this will cause portals to think the application is not sandboxed.

We should instead replaced the early return with a g_error() explaining that the sandbox cannot be used without running a GApplication instance with a valid app ID.
Comment 4 Carlos Garcia Campos 2021-06-28 05:09:23 PDT
Created attachment 432383 [details]
Patch
Comment 5 Michael Catanzaro 2021-06-28 07:15:59 PDT
Comment on attachment 432383 [details]
Patch

OK, but I would remove the 'return -1' lines before landing, because they are now unreachable.
Comment 6 Carlos Garcia Campos 2021-06-29 02:12:40 PDT
Committed r279369 (239235@main): <https://commits.webkit.org/239235@main>