[webkit-changes] [WebKit/WebKit] eabae2: [Navigation] Implement Navigation::Result binding

Rob Buis noreply at github.com
Thu Jan 18 07:05:16 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eabae2c49b43bc31b66a81b1d8050579730666e2
      https://github.com/WebKit/WebKit/commit/eabae2c49b43bc31b66a81b1d8050579730666e2
  Author: Rob Buis <rbuis at igalia.com>
  Date:   2024-01-18 (Thu, 18 Jan 2024)

  Changed paths:
    M Source/WebCore/bindings/js/JSDOMConvertPromise.h
    M Source/WebCore/bindings/js/JSDOMOperationReturningPromise.h
    M Source/WebCore/bindings/js/JSDOMPromiseDeferred.h
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/bindings/scripts/IDLAttributes.json
    M Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
    M Source/WebCore/bindings/scripts/test/TestObj.idl
    M Source/WebCore/page/Navigation.cpp
    M Source/WebCore/page/Navigation.h
    M Source/WebCore/page/Navigation.idl
    M Source/WebCore/page/NavigationHistoryEntry.h

  Log Message:
  -----------
  [Navigation] Implement Navigation::Result binding
https://bugs.webkit.org/show_bug.cgi?id=265325

Reviewed by Alex Christensen.

Implement Navigation::Result through extending the code generator, a new attribute 'ReturnsPromisePair'
is added, which mostly behaves like existing Promise handling, but in this case an extra DeferredPromise
parameter is passed to form a pair.

* Source/WebCore/bindings/js/JSDOMConvertPromise.h:
(WebCore::JSConverter<IDLPromise<T>>::convert):
* Source/WebCore/bindings/js/JSDOMOperationReturningPromise.h:
(WebCore::IDLOperationReturningPromise::callReturningPromisePair):
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:
(WebCore::callPromisePairFunction):
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateOperationTrampolineDefinition):
(GenerateOperationBodyDefinition):
(GenerateOperationDefinition):
(GenerateParametersCheck):
(NativeToJSValue):
* Source/WebCore/bindings/scripts/IDLAttributes.json:
* Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::convertDictionary<TestObj::PromisePair>):
(WebCore::JSTestObjDOMConstructor::construct):
(WebCore::jsTestObjPrototypeFunction_returnsPromisePairBody):
(WebCore::JSC_DEFINE_HOST_FUNCTION):
* Source/WebCore/bindings/scripts/test/JS/JSTestObj.h:
* Source/WebCore/bindings/scripts/test/TestObj.idl:
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::navigate):
(WebCore::Navigation::reload):
(WebCore::Navigation::traverseTo):
(WebCore::Navigation::back):
(WebCore::Navigation::forward):
(WebCore::createNewResult): Deleted.
* Source/WebCore/page/Navigation.h:
* Source/WebCore/page/Navigation.idl:
* Source/WebCore/page/NavigationHistoryEntry.h:

Canonical link: https://commits.webkit.org/273178@main




More information about the webkit-changes mailing list