Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c90f9757379af396dae841fd2ec8685977fbcce1
      
https://github.com/WebKit/WebKit/commit/c90f9757379af396dae841fd2ec8685977fbcce1
  Author: Darin Adler <[email protected]>
  Date:   2025-07-21 (Mon, 21 Jul 2025)

  Changed paths:
    M Source/WebCore/SaferCPPExpectations/ForwardDeclCheckerExpectations
    M Source/WebCore/bindings/js/WindowProxy.cpp
    M Source/WebCore/bindings/js/WindowProxy.h

  Log Message:
  -----------
  Putting HashMap in a heap block hurts memory use, speed, code size (WebCore 
bindings)
https://bugs.webkit.org/show_bug.cgi?id=295862
rdar://155737405

Reviewed by Sam Weinig.

HashMap and similar classes are already pointers to a hash table, so there is 
no reason
to wrap them in a unique_ptr in a heap block and add another level of 
indirection.

* Source/WebCore/SaferCPPExpectations/ForwardDeclCheckerExpectations: Removed 
WindowProxy.h.

* Source/WebCore/bindings/js/WindowProxy.cpp:
(WebCore::WindowProxy::WindowProxy): Removed unneeded initialization of 
m_jsWindowProxies.
(WebCore::WindowProxy::create): Moved from the header.
(WebCore::WindowProxy::~WindowProxy): Updated for change to type of 
m_jsWindowProxies.
(WebCore::WindowProxy::detachFromFrame): Ditto. Also use do/while loop.
(WebCore::WindowProxy::destroyJSWindowProxy): Ditto.
(WebCore::WindowProxy::createJSWindowProxy): Ditto.
(WebCore::WindowProxy::jsWindowProxiesAsVector const): Ditto.
(WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow): Ditto.
(WebCore::WindowProxy::setDOMWindow): Ditto.
(WebCore::WindowProxy::attachDebugger): Ditto.
(WebCore::WindowProxy::existingJSWindowProxy const): Moved from the header.
(WebCore::WindowProxy::jsWindowProxy): Moved from the header.
(WebCore::WindowProxy::releaseJSWindowProxies): Deleted. Unused.
(WebCore::WindowProxy::setJSWindowProxies): Deleted. Unused.

* Source/WebCore/bindings/js/WindowProxy.h: Cut down on includes.
Removed the unused type ProxyMap and unused functions releaseJSWindowProxies
and setJSWindowProxies. Moved create, jsWindowProxy, and existingJSWindowProxy
function out of the header into the .cpp file. Removed unnecessary exports of
createJSWindowProxyWithInitializedScript and setDOMWindow functions.
Use a map for m_jsWindowProxies, rather than a UniqueRef to a map.
(WebCore::WindowProxy::create): Deleted.
(WebCore::WindowProxy::jsWindowProxy): Deleted.
(WebCore::WindowProxy::existingJSWindowProxy const): Deleted.

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