Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 34dcefc88b83e69809fc0115f4173c0289d52196
https://github.com/WebKit/WebKit/commit/34dcefc88b83e69809fc0115f4173c0289d52196
Author: Yusuke Suzuki <[email protected]>
Date: 2024-04-30 (Tue, 30 Apr 2024)
Changed paths:
M Source/WebCore/bindings/js/JSCustomElementInterface.cpp
M Source/WebCore/bindings/js/JSCustomElementInterface.h
M Source/WebCore/bindings/js/JSValueInWrappedObject.h
Log Message:
-----------
Do not allocate WTF::Function in hot path
https://bugs.webkit.org/show_bug.cgi?id=273530
rdar://127332077
Reviewed by Keith Miller and Ryosuke Niwa.
We should just use template parameter instead of using Function. It does heap
allocation.
If it is hot path and if we do not store the function to somewhere to keep out
of this call's scope, it is wasting.
* Source/WebCore/bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::invokeCallback):
(WebCore::JSCustomElementInterface::invokeConnectedCallback):
(WebCore::JSCustomElementInterface::invokeDisconnectedCallback):
(WebCore::JSCustomElementInterface::invokeFormResetCallback):
* Source/WebCore/bindings/js/JSCustomElementInterface.h:
(WebCore::JSCustomElementInterface::invokeCallback): Deleted.
* Source/WebCore/bindings/js/JSValueInWrappedObject.h:
(WebCore::cachedPropertyValue):
Canonical link: https://commits.webkit.org/278199@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