Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 79db5296a25b51f07d9b9cc20db22e47fbda635a
https://github.com/WebKit/WebKit/commit/79db5296a25b51f07d9b9cc20db22e47fbda635a
Author: Yoav Weiss <[email protected]>
Date: 2025-10-02 (Thu, 02 Oct 2025)
Changed paths:
M Source/WebCore/dom/ScriptElement.cpp
M Source/WebCore/dom/ScriptElement.h
Log Message:
-----------
SpeculationRules: Don't create script type for speculationrules when pref is
off
https://bugs.webkit.org/show_bug.cgi?id=300039
Reviewed by Alex Christensen.
https://github.com/WebKit/WebKit/pull/48322 landed the speculation rules
feature, but missed a preference check.
This PR adds that preference check to avoid creating a speculationrules script
type when the preference is disabled.
It also adjusts the failing ASSERT and handles speculation rules registration
in that case.
* Source/WebCore/dom/ScriptElement.cpp:
(WebCore::ScriptElement::determineScriptType): Pass the speculation rules
preference.
(WebCore::ScriptElement::determineScriptType const): Avoid returning the
speculationrules type when preference is disabled.
(WebCore::ScriptElement::executePendingScript): Adjust ASSERT and register
speculation rules in case the preference is enabled.
* Source/WebCore/dom/ScriptElement.h:
Canonical link: https://commits.webkit.org/300895@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