Bug 241836

Summary: Make sure return value of dispatch_source_create is memory managed correctly
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: WebKit Misc.Assignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ddkilzer, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Alex Christensen 2022-06-21 19:44:46 PDT
Most of the time we can use smart pointers.  This should make the leaks tool happier.
Comment 1 Alex Christensen 2022-06-21 19:44:55 PDT
rdar://95625990
Comment 2 Alex Christensen 2022-06-21 19:46:24 PDT
Created attachment 460402 [details]
Patch
Comment 3 Alex Christensen 2022-06-22 00:16:33 PDT
Created attachment 460406 [details]
Patch
Comment 4 Alex Christensen 2022-06-22 00:41:41 PDT
Created attachment 460409 [details]
Patch
Comment 5 Chris Dumez 2022-06-22 08:42:19 PDT
Comment on attachment 460409 [details]
Patch

r=me
Comment 6 David Kilzer (:ddkilzer) 2022-06-22 10:05:58 PDT
Comment on attachment 460409 [details]
Patch

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

> Source/bmalloc/bmalloc/Scavenger.cpp:88
> +#if BPLATFORM(WATCHOS)
> +    // FIXME: This is concerning.
> +    static_assert(!__has_feature(objc_arc));
> +#else
> +    static_assert(__has_feature(objc_arc));
> +#endif

I'm not sure why ARC is disabled on watchOS as it's set to be enabled in Configurations/Base.xcconfig.
Comment 7 Alex Christensen 2022-06-22 10:12:13 PDT
The definition of BENABLE_LIBPAS is dependent on whether the CPU has 64-bit address spaces, and watchOS is the only EWS that is 32-bit and that code was inside #if !BUSE(LIBPAS)
Comment 8 Alex Christensen 2022-06-22 10:17:26 PDT
Created attachment 460418 [details]
Patch
Comment 9 EWS 2022-06-22 11:35:52 PDT
Committed r295740 (251745@main): <https://commits.webkit.org/251745@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460418 [details].
Comment 10 Radar WebKit Bug Importer 2022-06-22 11:36:12 PDT
<rdar://problem/95709464>