[Bindings] Simplify DOMPromiseProxy now that WTF::Function can return references
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Aug 2017 00:32:03 +0000 (00:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Aug 2017 00:32:03 +0000 (00:32 +0000)
commit6fe183799fa6c80ea63c8f832f8279341981ac72
treefdd24c9498ffff3efdfae2fda516106c2ac91bbf
parent5d41f59addf825654524efe1a098021b31c991c5
[Bindings] Simplify DOMPromiseProxy now that WTF::Function can return references
https://bugs.webkit.org/show_bug.cgi?id=175394

Patch by Sam Weinig <sam@webkit.org> on 2017-08-11
Reviewed by Chris Dumez.

* bindings/IDLTypes.h:
(WebCore::IDLWrapper::convertToParameterType): Deleted.

    Remove no longer used convertToParameterType.

* bindings/js/DOMPromiseProxy.h:

    - Replace Variant<Value, Exception> with ExceptionOr<Value> / ExceptionOr<void>.
    - Update ResolveCallback to have a return type of IDLType::ParameterType, rather than
      IDLType::ImplementationType, now that WTF::Function supports references as the
      return type. This is needed, since the IDLType::ParameterType for an interface T
      is T&.

* css/FontFace.cpp:
* css/FontFace.h:
* css/FontFaceSet.cpp:
* css/FontFaceSet.h:

    Update resolve callbacks to return a reference rather than a RefPtr, matching
    the new signature requirement.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/IDLTypes.h
Source/WebCore/bindings/js/DOMPromiseProxy.h
Source/WebCore/css/FontFace.cpp
Source/WebCore/css/FontFace.h
Source/WebCore/css/FontFaceSet.cpp
Source/WebCore/css/FontFaceSet.h