Bug 236318 - Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
Summary: Don't return an empty value from AbortController.signal.reason and make it ha...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-08 11:34 PST by Saam Barati
Modified: 2022-02-09 01:17 PST (History)
12 users (show)

See Also:


Attachments
patch (17.75 KB, patch)
2022-02-08 19:48 PST, Saam Barati
mark.lam: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
patch for landing (17.71 KB, patch)
2022-02-08 20:34 PST, Saam Barati
no flags Details | Formatted Diff | Diff
patch for landing (17.71 KB, patch)
2022-02-08 20:35 PST, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2022-02-08 11:34:21 PST
<rdar://88580935>
Comment 1 Radar WebKit Bug Importer 2022-02-08 11:35:10 PST
<rdar://problem/88643006>
Comment 2 Saam Barati 2022-02-08 19:48:35 PST
Created attachment 451336 [details]
patch
Comment 3 Mark Lam 2022-02-08 20:00:22 PST
Comment on attachment 451336 [details]
patch

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

> Source/WebCore/bindings/js/JSValueInWrappedObject.h:-47
> -    operator JSC::JSValue() const;

Maybe make this private so that the compiler complains if someone tries to cast?

> Source/WebCore/bindings/js/JSValueInWrappedObject.h:83
> +    if (m_nonCell)
> +        return true;
> +    return !!m_cell;

You can express this as:
    return m_nonCell || m_cell;
Comment 4 Mark Lam 2022-02-08 20:01:33 PST
Comment on attachment 451336 [details]
patch

r=me
Comment 5 Saam Barati 2022-02-08 20:34:22 PST
Created attachment 451337 [details]
patch for landing
Comment 6 Saam Barati 2022-02-08 20:35:26 PST
Created attachment 451338 [details]
patch for landing
Comment 7 EWS 2022-02-09 01:17:11 PST
Committed r289462 (247005@main): <https://commits.webkit.org/247005@main>

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