Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1d13510af04896b1d4420ea77ec73c9b6f23bb1f
      
https://github.com/WebKit/WebKit/commit/1d13510af04896b1d4420ea77ec73c9b6f23bb1f
  Author: Mark Lam <mark....@apple.com>
  Date:   2025-01-12 (Sun, 12 Jan 2025)

  Changed paths:
    M 
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm
    M Source/bmalloc/bmalloc/TZoneHeapManager.cpp
    M Source/bmalloc/bmalloc/TZoneHeapManager.h

  Log Message:
  -----------
  Opt WebKit processes into requiring a per boot seed for TZoneHeapManager.
https://bugs.webkit.org/show_bug.cgi?id=285804
rdar://142752165

Reviewed by Keith Miller and Yusuke Suzuki.

In 288751@main, we removed a RELEASE_BASSERT that ensures that the 
TZoneHeapManager primodialSeed
is unique per boot to accommodate clients code that are not WebKit processes 
which may not have
access to kern.boottime.  However, we can restore this RELEASE_ASSERT for 
WebKit processes which
we do know have access.

This patch adds TZoneHeapManager::requirePerBootSeed() which allows a client to 
opt into enabling
that RELEASE_BASSERT, and requiring a unique per boot seed.

Also renamed m_state to s_state since it is a static field.
Also made bucketsForSmallSizes, bucketsForLargeSizes, and maxSmallSize static 
since the are only
accessed in TZoneHeapManager.cpp.

* Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
* Source/bmalloc/bmalloc/TZoneHeapManager.cpp:
(bmalloc::api::TZoneHeapManager::TZoneHeapManager):
(bmalloc::api::TZoneHeapManager::requirePerBootSeed):
(bmalloc::api::TZoneHeapManager::setBucketParams):
(bmalloc::api::TZoneHeapManager::init):
(bmalloc::api::TZoneHeapManager::isReady):
(bmalloc::api::TZoneHeapManager::dumpRegisteredTypes):
(bmalloc::api::TZoneHeapManager::populateBucketsForSizeClass):
(bmalloc::api::TZoneHeapManager::heapRefForTZoneType):
* Source/bmalloc/bmalloc/TZoneHeapManager.h:

Canonical link: https://commits.webkit.org/288777@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