[webkit-changes] [WebKit/WebKit] 47eea1: Drop Supplementable::removeSupplement() to simplif...
Chris Dumez
noreply at github.com
Fri Oct 11 17:09:19 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 47eea119fe9462721e5cc75527a4280c6d5f5214
https://github.com/WebKit/WebKit/commit/47eea119fe9462721e5cc75527a4280c6d5f5214
Author: Chris Dumez <cdumez at apple.com>
Date: 2024-10-11 (Fri, 11 Oct 2024)
Changed paths:
M Source/WebCore/dom/WindowOrWorkerGlobalScopeTrustedTypes.cpp
M Source/WebCore/dom/WindowOrWorkerGlobalScopeTrustedTypes.h
M Source/WebCore/platform/Supplementable.h
M Source/WebCore/workers/WorkerGlobalScope.cpp
Log Message:
-----------
Drop Supplementable::removeSupplement() to simplify Supplement lifetime model
https://bugs.webkit.org/show_bug.cgi?id=281328
Reviewed by Geoffrey Garen and Ryosuke Niwa.
It was only used in one place and wasn't truly required.
Also call `m_supplements.add()` instead of `m_supplements.set()` to guarantee
we don't overwrite an existing Supplement and thus destroy it before the
Supplementable gets destroyed.
* Source/WebCore/dom/WindowOrWorkerGlobalScopeTrustedTypes.cpp:
(WebCore::WorkerGlobalScopeTrustedTypes::prepareForDestruction):
(WebCore::WorkerGlobalScopeTrustedTypes::trustedTypes const):
(WebCore::WorkerGlobalScopeTrustedTypes::supplementName): Deleted.
* Source/WebCore/dom/WindowOrWorkerGlobalScopeTrustedTypes.h:
(WebCore::WorkerGlobalScopeTrustedTypes::supplementName):
* Source/WebCore/platform/Supplementable.h:
(WebCore::Supplementable::removeSupplement): Deleted.
* Source/WebCore/workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::prepareForDestruction):
Canonical link: https://commits.webkit.org/285049@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