Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7e1ce4ca4dde839299bd340169b10fdd6cdd6e65
https://github.com/WebKit/WebKit/commit/7e1ce4ca4dde839299bd340169b10fdd6cdd6e65
Author: Rob Buis <[email protected]>
Date: 2024-04-15 (Mon, 15 Apr 2024)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/reload-already-detached-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/reload-detach-in-serialization-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/traverseTo-already-detached-expected.txt
M Source/WebCore/bindings/IDLTypes.h
M Source/WebCore/bindings/js/JSDOMConvertPromise.h
M Source/WebCore/bindings/js/JSDOMPromiseDeferredForward.h
M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
M Source/WebCore/bindings/scripts/IDLAttributes.json
M Source/WebCore/page/Navigation.cpp
M Source/WebCore/page/Navigation.idl
Log Message:
-----------
[Navigation] Throw exceptions in navigation methods if in detached state
https://bugs.webkit.org/show_bug.cgi?id=269987
Reviewed by Darin Adler.
The back/forward/traverseTo implementation needs to check whether the document
is fully active and throw an exception if not [1].
Similar rules apply to reload [2] and navigate [3].
To fix the frame/document detachment, add an IDL attribute
[BypassDocumentFullyActiveCheck], which ignores the script execution context
being suspended and avoids the ASSERT in DOMPromise::promise().
This behaviour matches callPromiseFunction, which simply returns the JSPromise
and ignores the script execution context.
[1]
https://html.spec.whatwg.org/multipage/nav-history-apis.html#performing-a-navigation-api-traversal
(step 5)
[2]
https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-reload
(step 5)
[3]
https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-navigate
(step 7)
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/reload-already-detached-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/reload-detach-in-serialization-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/traverseTo-already-detached-expected.txt:
* Source/WebCore/bindings/IDLTypes.h:
* Source/WebCore/bindings/js/JSDOMConvertPromise.h:
(WebCore::JSConverter<IDLPromiseIgnoringSuspension<T>>::convert):
* Source/WebCore/bindings/js/JSDOMPromiseDeferredForward.h:
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GetBaseIDLType):
* Source/WebCore/bindings/scripts/IDLAttributes.json:
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::reload):
(WebCore::Navigation::navigate):
(WebCore::Navigation::performTraversal):
(WebCore::Navigation::updateCurrentEntry):
* Source/WebCore/page/Navigation.idl:
Canonical link: https://commits.webkit.org/277487@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