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

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: Clone LoggingCanvas log 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/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..d6289cd08707a045287bfe3d57019b4c0b073a34 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -328,17 +328,17 @@ 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;
}
if (!value->isNull()) {
- if (value->getType() != JSONValue::TypeObject) {
+ if (value->type() != JSONValue::TypeObject) {
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));

Powered by Google App Engine
This is Rietveld 408576698