Fix the Windows build after <https://trac.webkit.org/changeset/197905>
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2016 01:46:40 +0000 (01:46 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2016 01:46:40 +0000 (01:46 +0000)
(https://bugs.webkit.org/show_bug.cgi?id=155247)

We need to call the std::unique_ptr<CryptoDigest>() constructor directly
instead of using the convenience function std::make_unique<CryptoDigest>()
because std::make_unique<CryptoDigest>() cannot access the private constructor
CryptoDigest().

* platform/crypto/win/CryptoDigestWin.cpp:
(WebCore::CryptoDigest::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197911 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/crypto/win/CryptoDigestWin.cpp

index 34624d3..041226f 100644 (file)
@@ -1,5 +1,18 @@
 2016-03-09  Daniel Bates  <dabates@apple.com>
 
+        Fix the Windows build after <https://trac.webkit.org/changeset/197905>
+        (https://bugs.webkit.org/show_bug.cgi?id=155247)
+
+        We need to call the std::unique_ptr<CryptoDigest>() constructor directly
+        instead of using the convenience function std::make_unique<CryptoDigest>()
+        because std::make_unique<CryptoDigest>() cannot access the private constructor
+        CryptoDigest().
+
+        * platform/crypto/win/CryptoDigestWin.cpp:
+        (WebCore::CryptoDigest::create):
+
+2016-03-09  Daniel Bates  <dabates@apple.com>
+
         [Win] Implement CryptoDigest
         https://bugs.webkit.org/show_bug.cgi?id=155247
         <rdar://problem/25065843>
index faca723..76cc192 100644 (file)
@@ -51,11 +51,10 @@ CryptoDigest::~CryptoDigest()
 
 std::unique_ptr<CryptoDigest> CryptoDigest::create(Algorithm algorithm)
 {
-    auto digest = std::make_unique<CryptoDigest>();
+    std::unique_ptr<CryptoDigest> digest(new CryptoDigest);
     digest->m_context->algorithm = algorithm;
     if (!CryptAcquireContext(&digest->m_context->hContext, nullptr, nullptr /* use default provider */, PROV_RSA_AES, CRYPT_VERIFYCONTEXT))
         return nullptr;
-
     bool succeeded = false;
     switch (algorithm) {
     case CryptoDigest::Algorithm::SHA_1: {