Re-implement ExceptionOr on top of WTF::Expected
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jan 2017 00:33:39 +0000 (00:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jan 2017 00:33:39 +0000 (00:33 +0000)
commitf5083a0e06a649dd91bdf280fb0ed27fefdaf44c
treeabfb750d9810286003dba579322e363eb63217cf
parent3f5b8433373d2b2a2e60effcdaac38512c283ae1
Re-implement ExceptionOr on top of WTF::Expected
https://bugs.webkit.org/show_bug.cgi?id=166668

Patch by Sam Weinig <sam@webkit.org> on 2017-01-03
Reviewed by Alex Christensen.

As a first step towards using WTF::Expected instead of ExceptionOr,
use Expected as an implementation detail, rather than Variant/std::optional.

* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
Add missing #include of Variant.h

* dom/ExceptionOr.h:
(WebCore::ExceptionOr<ReturnType>::ExceptionOr):
(WebCore::ExceptionOr<ReturnType>::hasException):
(WebCore::ExceptionOr<ReturnType>::releaseException):
(WebCore::ExceptionOr<ReturnType>::releaseReturnValue):
(WebCore::ExceptionOr<void>::ExceptionOr):
(WebCore::ExceptionOr<void>::hasException):
(WebCore::ExceptionOr<void>::releaseException):
Re-implement on top of Expected.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmHMAC.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp
Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp
Source/WebCore/dom/ExceptionOr.h