Bug 236318

Summary: Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, eric.carlson, esprehn+autocc, ews-watchlist, glenn, jer.noble, kangil.han, mark.lam, philipj, sergio, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
mark.lam: review+, ews-feeder: commit-queue-
patch for landing
none
patch for landing none

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