Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 47eea119fe9462721e5cc75527a4280c6d5f5214
      
https://github.com/WebKit/WebKit/commit/47eea119fe9462721e5cc75527a4280c6d5f5214
  Author: Chris Dumez <[email protected]>
  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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to