Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Unified Diff: third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp

Issue 2218533002: Backporting JSONValues from protocol::Values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch back to partition allocator Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp
diff --git a/third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp b/third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp
index 0bba452cdc02477dcb7ee1402bb30323b276d7a9..bf8704d38c27fb10af7e9f03194ba4e1b18d4ea5 100644
--- a/third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp
+++ b/third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp
@@ -80,10 +80,10 @@ static bool copySequenceOfStringProperty(const char* property, const Dictionary&
Vector<String> value;
if (!DictionaryHelper::get(source, property, value))
return false;
- RefPtr<JSONArray> jsonArray = JSONArray::create();
+ std::unique_ptr<JSONArray> jsonArray = JSONArray::create();
for (unsigned i = 0; i < value.size(); ++i)
jsonArray->pushString(value[i]);
- destination->setArray(property, jsonArray.release());
+ destination->setArray(property, std::move(jsonArray));
return true;
}
@@ -133,7 +133,7 @@ static bool parseJsonWebKey(const Dictionary& dict, WebVector<uint8_t>& jsonUtf8
// * Parse "oth" (crbug.com/441396)
// * Fail with TypeError (not DataError) if the input does not conform
// to a JsonWebKey
- RefPtr<JSONObject> jsonObject = JSONObject::create();
+ std::unique_ptr<JSONObject> jsonObject = JSONObject::create();
if (!copyStringProperty("kty", dict, jsonObject.get())) {
result->completeWithError(WebCryptoErrorTypeData, "The required JWK member \"kty\" was missing");

Powered by Google App Engine
This is Rietveld 408576698