Bug 217123

Summary: [GTK] Chassis type check fails if the value is quoted
Product: WebKit Reporter: Alice Mikhaylenko <alicem>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, bugs-noreply, cdumez, cgarcia, cmarcelo, ews-watchlist
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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].