Bug 256269 - Make IsWeakCallback the default
Summary: Make IsWeakCallback the default
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryan Reno
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-03 13:57 PDT by Ryan Reno
Modified: 2024-07-02 22:36 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.