Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 96442108e57a1e5bae0e51960e42749254332ced
https://github.com/WebKit/WebKit/commit/96442108e57a1e5bae0e51960e42749254332ced
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-18 (Sat, 18 Jul 2026)
Changed paths:
M Source/WebCore/inspector/InspectorInstrumentation.cpp
Log Message:
-----------
Web Inspector: InspectorInstrumentation's instrumenting-agents registry
manually new/deletes its HashSet
https://bugs.webkit.org/show_bug.cgi?id=319756
rdar://182606146
Reviewed by Devin Rousso.
InspectorInstrumentation kept a file-scope raw HashSet<InstrumentingAgents*>*
that it new'd on first registration and delete'd once the last agent
unregistered. Replace it with the usual WebKit pattern for a lazily
constructed global registry — a static accessor function wrapping a
function-local NeverDestroyed<HashSet<InstrumentingAgents*>>, matching
Node::liveNodes, GCReachableRefMap::map(), etc. This drops the manual
new/delete and the null checks at every call site; the set is simply left
empty when unused. No behavior change.
* Source/WebCore/inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
(WebCore::InspectorInstrumentation::registerInstrumentingAgents):
(WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
Canonical link: https://commits.webkit.org/317485@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications