Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2aa59a0d48ddd9684584ccbbb6db8207d1a62733
      
https://github.com/WebKit/WebKit/commit/2aa59a0d48ddd9684584ccbbb6db8207d1a62733
  Author: Yijia Huang <yijia_hu...@apple.com>
  Date:   2024-06-19 (Wed, 19 Jun 2024)

  Changed paths:
    M Source/JavaScriptCore/runtime/DeferredWorkTimer.cpp
    M Source/JavaScriptCore/runtime/DeferredWorkTimer.h
    M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
    M Source/JavaScriptCore/runtime/JSGlobalObject.h
    M Source/JavaScriptCore/runtime/WaiterListManager.cpp
    M Source/JavaScriptCore/wasm/WasmStreamingCompiler.cpp

  Log Message:
  -----------
  [JSC] Use WeakHashSet for the DeferredWorkTimer::Ticket's stored in 
JSGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=275518
rdar://129879654

Reviewed by Yusuke Suzuki.

Use WeakHashSet for managing the TicketData's stored in JSGlobalObject
to avoid the manual unregistration in the destruction of TicketData.

* Source/JavaScriptCore/runtime/DeferredWorkTimer.cpp:
(JSC::DeferredWorkTimer::TicketData::TicketData):
(JSC::DeferredWorkTimer::TicketData::create):
(JSC::DeferredWorkTimer::TicketData::cancel):
(JSC::DeferredWorkTimer::TicketData::globalObject):
(JSC::DeferredWorkTimer::doWork):
(JSC::DeferredWorkTimer::addPendingWork):
(JSC::DeferredWorkTimer::cancelPendingWorkSafe):
(JSC::DeferredWorkTimer::TicketData::~TicketData): Deleted.
(JSC::DeferredWorkTimer::TicketData::clearGlobalObject): Deleted.
* Source/JavaScriptCore/runtime/DeferredWorkTimer.h:
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
(JSC::JSGlobalObject::visitChildrenImpl):
(JSC::JSGlobalObject::addTicket):
(JSC::JSGlobalObject::clearTickets):
(JSC::JSGlobalObject::addObjectsForTicket): Deleted.
(JSC::JSGlobalObject::removeObjectsForTicket): Deleted.
(JSC::JSGlobalObject::clearObjectsForTicket): Deleted.
* Source/JavaScriptCore/runtime/JSGlobalObject.h:
* Source/JavaScriptCore/runtime/WaiterListManager.cpp:
(JSC::WaiterListManager::notifyWaiterImpl):
(JSC::WaiterListManager::unregister):
(JSC::Waiter::dump const):

Canonical link: https://commits.webkit.org/280180@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to