Bug 227344 - [GTK][WPE] Check GApplication has a valid ID before trying to create the flatpack info
Summary: [GTK][WPE] Check GApplication has a valid ID before trying to create the flat...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2021-06-24 02:43 PDT by Carlos Garcia Campos
Modified: 2021-06-29 02:12 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.73 KB, patch)
2021-06-24 02:45 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch (1.73 KB, patch)
2021-06-24 02:46 PDT, Carlos Garcia Campos
mcatanzaro: review-
Details | Formatted Diff | Diff
Patch (2.08 KB, patch)
2021-06-28 05:09 PDT, Carlos Garcia Campos
mcatanzaro: review+
mcatanzaro: commit-queue-
Details | Formatted Diff | Diff

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