[webkit-changes] [WebKit/WebKit] 5d7605: WebMediaKeySystemClient in WebKitLegacy is never d...

Jer Noble noreply at github.com
Tue Oct 17 17:36:00 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5d76057016f8bff68ccc037253f01541b8655703
      https://github.com/WebKit/WebKit/commit/5d76057016f8bff68ccc037253f01541b8655703
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-10-17 (Tue, 17 Oct 2023)

  Changed paths:
    M Source/WebKitLegacy/mac/WebCoreSupport/WebMediaKeySystemClient.h
    M Source/WebKitLegacy/mac/WebCoreSupport/WebMediaKeySystemClient.mm
    M Source/WebKitLegacy/mac/WebView/WebView.mm

  Log Message:
  -----------
  WebMediaKeySystemClient in WebKitLegacy is never deallocated
https://bugs.webkit.org/show_bug.cgi?id=262984
rdar://99384041

Reviewed by Eric Carlson.

No object "owns" the WebMediaKeySystemClient created by WebView, so it is leaked
when the WebView itself is destroyed. Instead of creating a new WebMediaKeySystemClient
for each WebView, since the client itself just has default implementations of the
overridden client methods, just make it a singleton.

* Source/WebKitLegacy/mac/WebCoreSupport/WebMediaKeySystemClient.h:
(): Deleted.
* Source/WebKitLegacy/mac/WebCoreSupport/WebMediaKeySystemClient.mm:
(WebMediaKeySystemClient::singleton):
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

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




More information about the webkit-changes mailing list