Bug 217123 - [GTK] Chassis type check fails if the value is quoted
Summary: [GTK] Chassis type check fails if the value is quoted
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:
Depends on:
Blocks:
 
Reported: 2020-09-30 02:13 PDT by Alice Mikhaylenko
Modified: 2020-09-30 07:18 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.80 KB, patch)
2020-09-30 05:20 PDT, Alice Mikhaylenko
no flags Details | Formatted Diff | Diff
Patch (1.78 KB, patch)
2020-09-30 06:24 PDT, Alice Mikhaylenko
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alice Mikhaylenko 2020-09-30 02:13:32 PDT
The values in /etc/machine-info can be quoteed like `CHASSIS="handset"`. In this case the check will fail because `"handset"` isn't same as `handset`. We should unquote it.
Comment 1 Alice Mikhaylenko 2020-09-30 05:20:52 PDT
Created attachment 410108 [details]
Patch
Comment 2 Carlos Garcia Campos 2020-09-30 06:07:15 PDT
Comment on attachment 410108 [details]
Patch

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

> Source/WTF/wtf/glib/ChassisType.cpp:51
> +            if (error.get() != nullptr)

Do not compare to nullptr, and you don't need the .get() either:

if (error)
    g_warning();
Comment 3 Alice Mikhaylenko 2020-09-30 06:24:51 PDT
Created attachment 410111 [details]
Patch
Comment 4 Alice Mikhaylenko 2020-09-30 06:25:03 PDT
Sure.
Comment 5 EWS 2020-09-30 07:18:16 PDT
Committed r267789: <https://trac.webkit.org/changeset/267789>

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