Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 13f4ac88fbf3059b7323b8ee99274f350031691d
      
https://github.com/WebKit/WebKit/commit/13f4ac88fbf3059b7323b8ee99274f350031691d
  Author: Rob Buis <[email protected]>
  Date:   2024-09-12 (Thu, 12 Sep 2024)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/no-crash-set-exception-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/pseudo-get-computed-style-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-skipped-from-invalid-callback-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/intercept-handler-throws-expected.txt
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h
    M Source/WebCore/bindings/scripts/test/TestCallbackInterface.idl

  Log Message:
  -----------
  [Navigation] Handle handler callback throwing an exception
https://bugs.webkit.org/show_bug.cgi?id=279061

Reviewed by Chris Dumez.

Add IDL logic to treat exceptions being thrown from a callback as a returned 
promise rejected with that exception, in case the return type is a Promise [1].

The "wait for all" logic in Navigation.cpp knows how to deal with such rejected 
promises, so intercept-handler-throws.html passes.

[1] https://webidl.spec.whatwg.org/#js-invoking-callback-functions (Step 14.7)

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/no-crash-set-exception-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/pseudo-get-computed-style-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/transition-skipped-from-invalid-callback-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/intercept-handler-throws-expected.txt:
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementationContent):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
(WebCore::JSTestCallbackInterface::callbackThatRethrowsExceptions):
(WebCore::JSTestCallbackInterface::callbackThatTreatsExceptionAsRejectedPromise):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h:
* Source/WebCore/bindings/scripts/test/TestCallbackInterface.idl:

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