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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.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
« no previous file with comments | « third_party/WebKit/Source/modules/nfc/NFC.cpp ('k') | third_party/WebKit/Source/platform/JSONValues.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
index be948757a6651bef88a1858acc88fbbd932a4c02..9759a2fbf9a3467804917a353804413ee3c8946d 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -328,7 +328,7 @@ void validateAndConvertPaymentMethodData(const HeapVector<PaymentMethodData>& pa
String stringifiedData = "";
if (pmd.hasData() && !pmd.data().isEmpty()) {
- RefPtr<JSONValue> value = toJSONValue(pmd.data().context(), pmd.data().v8Value());
+ std::unique_ptr<JSONValue> value = toJSONValue(pmd.data().context(), pmd.data().v8Value());
if (!value) {
exceptionState.throwTypeError("Unable to parse payment method specific data");
return;
@@ -338,7 +338,7 @@ void validateAndConvertPaymentMethodData(const HeapVector<PaymentMethodData>& pa
exceptionState.throwTypeError("Data should be a JSON-serializable object");
return;
}
- stringifiedData = JSONObject::cast(value)->toJSONString();
+ stringifiedData = JSONObject::cast(value.get())->toJSONString();
}
}
methodData->append(PaymentRequest::MethodData(pmd.supportedMethods(), stringifiedData));
« no previous file with comments | « third_party/WebKit/Source/modules/nfc/NFC.cpp ('k') | third_party/WebKit/Source/platform/JSONValues.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698