[webkit-changes] [WebKit/WebKit] fce181: [JSC] Should use WeakPtr for Waiter's TicketData
Yijia Huang
noreply at github.com
Wed Jul 10 12:56:12 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fce181433e3b5225ab4b92a9be2491415964291a
https://github.com/WebKit/WebKit/commit/fce181433e3b5225ab4b92a9be2491415964291a
Author: Yijia Huang <yijia_huang at apple.com>
Date: 2024-07-10 (Wed, 10 Jul 2024)
Changed paths:
M Source/JavaScriptCore/runtime/WaiterListManager.cpp
M Source/JavaScriptCore/runtime/WaiterListManager.h
Log Message:
-----------
[JSC] Should use WeakPtr for Waiter's TicketData
https://bugs.webkit.org/show_bug.cgi?id=276410
rdar://131442732
Reviewed by Yusuke Suzuki.
Previously, we fixed the memory issue in DeferredWorkTimer::TicketData
by letting JSGlobalObject to strong reference TicketData's dependencies[1].
Later, we fixed the tracked TicketData with WeakHashSet in JSGlobalObject[2].
This patch fixed a similar issue by applying WeakPtr to Waiter's TicketData.
I've confirmed that all DeferredWorkTimer::TicketData uses are guarded by
WeakPtr, WeakHashSet, Ref, or RefPtr.
[1] https://commits.webkit.org/279852@main
[2] https://commits.webkit.org/280180@main
* Source/JavaScriptCore/runtime/WaiterListManager.cpp:
(JSC::Waiter::scheduleWorkAndClearTicket):
(JSC::WaiterListManager::cancelAsyncWaiter):
(JSC::Waiter::dump const):
* Source/JavaScriptCore/runtime/WaiterListManager.h:
Canonical link: https://commits.webkit.org/280830@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list