Bug 256269

Summary: Make IsWeakCallback the default
Product: WebKit Reporter: Ryan Reno <rreno>
Component: BindingsAssignee: Ryan Reno <rreno>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=251835

Description Ryan Reno 2023-05-03 13:57:13 PDT
Currently callbacks in the bindings generate Strong<> references which act as GC roots. It's probably a better default to create Weak<> references in the default case and provide a IsStrongCallback extended IDL attribute for cases where Strong<> is necessary.
Comment 1 Radar WebKit Bug Importer 2023-05-03 13:57:39 PDT
<rdar://problem/108859209>
Comment 2 Ryan Reno 2023-05-11 16:37:28 PDT
After my experience with MediaSession this is pretty ambitious. There can be non-trivial logic involved in keeping callbacks alive.
Comment 3 Ryan Reno 2024-07-02 15:51:37 PDT
Pull request: https://github.com/WebKit/WebKit/pull/30415
Comment 4 EWS 2024-07-02 22:36:56 PDT
Committed 280611@main (39ee5e3e49f1): <https://commits.webkit.org/280611@main>

Reviewed commits have been landed. Closing PR #30415 and removing active labels.