diff --git a/DEPS b/DEPS index bb2b558..720f9edc 100644 --- a/DEPS +++ b/DEPS
@@ -59,7 +59,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '611d48c1ed3982304dfb027fd4c483611d6ee74c', + 'skia_revision': '0b78a6912eba5b50eeb4a13f735957dd57ca6be2', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other.
diff --git a/chrome/browser/chrome_browser_field_trials.cc b/chrome/browser/chrome_browser_field_trials.cc index 4ceb5c2d3..ff10b16 100644 --- a/chrome/browser/chrome_browser_field_trials.cc +++ b/chrome/browser/chrome_browser_field_trials.cc
@@ -79,7 +79,6 @@ base::GlobalHistogramAllocator::ConstructFilePathsForUploadDir( metrics_dir, upload_dir, ChromeMetricsServiceClient::kBrowserMetricsName, &upload_file, &active_file, &spare_file); - DCHECK(!base::PathExists(active_file)); // The "active" file isn't used any longer. Metics are stored directly into // the "upload" file and a run-time filter prevents its upload as long as the
diff --git a/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp b/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp index 0a40b4c1..4cf1cdb4 100644 --- a/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp
@@ -92,38 +92,38 @@ return reinterpret_cast<intptr_t>(root_.Get()); } -SuspendableObjectsInfo::SuspendableObjectsInfo( +PausableObjectsInfo::PausableObjectsInfo( int number_of_objects_with_pending_activity) : number_of_objects_with_pending_activity_( number_of_objects_with_pending_activity) {} -SuspendableObjectsInfo::~SuspendableObjectsInfo() {} +PausableObjectsInfo::~PausableObjectsInfo() {} -void SuspendableObjectsInfo::Dispose() { +void PausableObjectsInfo::Dispose() { delete this; } -bool SuspendableObjectsInfo::IsEquivalent(v8::RetainedObjectInfo* other) { +bool PausableObjectsInfo::IsEquivalent(v8::RetainedObjectInfo* other) { return this == other; } -intptr_t SuspendableObjectsInfo::GetHash() { +intptr_t PausableObjectsInfo::GetHash() { return PtrHash<void>::GetHash(this); } -const char* SuspendableObjectsInfo::GetGroupLabel() { +const char* PausableObjectsInfo::GetGroupLabel() { return "(Pending activities group)"; } -const char* SuspendableObjectsInfo::GetLabel() { +const char* PausableObjectsInfo::GetLabel() { return "Pending activities"; } -intptr_t SuspendableObjectsInfo::GetElementCount() { +intptr_t PausableObjectsInfo::GetElementCount() { return number_of_objects_with_pending_activity_; } -intptr_t SuspendableObjectsInfo::GetEquivalenceClass() { +intptr_t PausableObjectsInfo::GetEquivalenceClass() { return reinterpret_cast<intptr_t>(this); }
diff --git a/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.h b/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.h index dbd9922..ecda5eb5 100644 --- a/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.h +++ b/third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.h
@@ -63,10 +63,10 @@ UntracedMember<Node> root_; }; -class SuspendableObjectsInfo final : public RetainedObjectInfo { +class PausableObjectsInfo final : public RetainedObjectInfo { public: - explicit SuspendableObjectsInfo(int number_of_objects_with_pending_activity); - ~SuspendableObjectsInfo() override; + explicit PausableObjectsInfo(int number_of_objects_with_pending_activity); + ~PausableObjectsInfo() override; void Dispose() override; bool IsEquivalent(v8::RetainedObjectInfo* other) override; intptr_t GetHash() override;
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp index 6ccacbb..2e6fb2c 100644 --- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
@@ -168,7 +168,7 @@ AbortTracing(); groups_.push_back( - std::make_pair(new SuspendableObjectsInfo(found_v8_wrappers_.size()), + std::make_pair(new PausableObjectsInfo(found_v8_wrappers_.size()), std::move(found_v8_wrappers_))); }
diff --git a/third_party/WebKit/Source/modules/payments/BasicCardHelper.cpp b/third_party/WebKit/Source/modules/payments/BasicCardHelper.cpp index 423dd39..ce18c51 100644 --- a/third_party/WebKit/Source/modules/payments/BasicCardHelper.cpp +++ b/third_party/WebKit/Source/modules/payments/BasicCardHelper.cpp
@@ -6,6 +6,7 @@ #include "bindings/modules/v8/V8BasicCardRequest.h" #include "modules/payments/BasicCardRequest.h" +#include "modules/payments/PaymentRequest.h" namespace blink { @@ -14,8 +15,6 @@ using ::payments::mojom::blink::BasicCardNetwork; using ::payments::mojom::blink::BasicCardType; -static const size_t kMaxListSize = 1024; - const struct { const payments::mojom::BasicCardNetwork code; const char* const name; @@ -51,7 +50,7 @@ return; if (basic_card.hasSupportedNetworks()) { - if (basic_card.supportedNetworks().size() > kMaxListSize) { + if (basic_card.supportedNetworks().size() > PaymentRequest::kMaxListSize) { exception_state.ThrowTypeError( "basic-card supportedNetworks cannot be longer than 1024 elements"); return; @@ -68,7 +67,7 @@ } if (basic_card.hasSupportedTypes()) { - if (basic_card.supportedTypes().size() > kMaxListSize) { + if (basic_card.supportedTypes().size() > PaymentRequest::kMaxListSize) { exception_state.ThrowTypeError( "basic-card supportedTypes cannot be longer than 1024 elements"); return;
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp index 2c24c08..ff42330 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -139,10 +139,6 @@ // resolved, then behave as if the website called complete("fail"). static const int kCompleteTimeoutSeconds = 60; -static const size_t kMaxStringLength = 1024; -static const size_t kMaxJSONStringLength = 1048576; -static const size_t kMaxListSize = 1024; - // Validates ShippingOption or PaymentItem, which happen to have identical // fields, except for "id", which is present only in ShippingOption. template <typename T> @@ -155,25 +151,26 @@ DCHECK(item.amount().hasValue()); DCHECK(item.amount().hasCurrency()); - if (item.label().length() > kMaxStringLength) { + if (item.label().length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError("The label for " + item_name + " cannot be longer than 1024 characters"); return; } - if (item.amount().currency().length() > kMaxStringLength) { + if (item.amount().currency().length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError("The currency code for " + item_name + " cannot be longer than 1024 characters"); return; } - if (item.amount().currencySystem().length() > kMaxStringLength) { + if (item.amount().currencySystem().length() > + PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError("The currency system for " + item_name + " cannot be longer than 1024 characters"); return; } - if (item.amount().value().length() > kMaxStringLength) { + if (item.amount().value().length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError("The amount value for " + item_name + " cannot be longer than 1024 characters"); return; @@ -206,7 +203,7 @@ Vector<PaymentItemPtr>& output, ExecutionContext& execution_context, ExceptionState& exception_state) { - if (input.size() > kMaxListSize) { + if (input.size() > PaymentRequest::kMaxListSize) { exception_state.ThrowTypeError("At most 1024 " + item_names + " allowed"); return; } @@ -231,7 +228,7 @@ String& shipping_option_output, ExecutionContext& execution_context, ExceptionState& exception_state) { - if (input.size() > kMaxListSize) { + if (input.size() > PaymentRequest::kMaxListSize) { exception_state.ThrowTypeError("At most 1024 shipping options allowed"); return; } @@ -244,7 +241,7 @@ return; DCHECK(option.hasId()); - if (option.id().length() > kMaxStringLength) { + if (option.id().length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError( "Shipping option ID cannot be longer than 1024 characters"); return; @@ -305,7 +302,7 @@ output->environment = payments::mojom::blink::AndroidPayEnvironment::TEST; if (android_pay.hasMerchantName() && - android_pay.merchantName().length() > kMaxStringLength) { + android_pay.merchantName().length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError( "Android Pay merchant name cannot be longer than 1024 characters"); return; @@ -313,7 +310,7 @@ output->merchant_name = android_pay.merchantName(); if (android_pay.hasMerchantId() && - android_pay.merchantId().length() > kMaxStringLength) { + android_pay.merchantId().length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError( "Android Pay merchant id cannot be longer than 1024 characters"); return; @@ -388,7 +385,7 @@ tokenization.parameters().GetPropertyNames(exception_state); if (exception_state.HadException()) return; - if (keys.size() > kMaxListSize) { + if (keys.size() > PaymentRequest::kMaxListSize) { exception_state.ThrowTypeError( "At most 1024 tokenization parameters allowed for Android Pay"); return; @@ -397,13 +394,13 @@ for (const String& key : keys) { if (!DictionaryHelper::Get(tokenization.parameters(), key, value)) continue; - if (key.length() > kMaxStringLength) { + if (key.length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError( "Android Pay tokenization parameter key cannot be longer than " "1024 characters"); return; } - if (value.length() > kMaxStringLength) { + if (value.length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError( "Android Pay tokenization parameter value cannot be longer than " "1024 characters"); @@ -444,7 +441,8 @@ output->stringified_data = V8StringToWebCoreString<String>(value, kDoNotExternalize); - if (output->stringified_data.length() > kMaxJSONStringLength) { + if (output->stringified_data.length() > + PaymentRequest::kMaxJSONStringLength) { exception_state.ThrowTypeError( "JSON serialization of payment method data should be no longer than " "1048576 characters"); @@ -501,7 +499,7 @@ Vector<PaymentDetailsModifierPtr>& output, ExecutionContext& execution_context, ExceptionState& exception_state) { - if (input.size() > kMaxListSize) { + if (input.size() > PaymentRequest::kMaxListSize) { exception_state.ThrowTypeError("At most 1024 modifiers allowed"); return; } @@ -543,14 +541,14 @@ return; } - if (supported_methods.size() > kMaxListSize) { + if (supported_methods.size() > PaymentRequest::kMaxListSize) { exception_state.ThrowTypeError( "At most 1024 supportedMethods allowed for modifier"); return; } for (const String& method : supported_methods) { - if (method.length() > kMaxStringLength) { + if (method.length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError( "Supported method name for identifier cannot be longer than 1024 " "characters"); @@ -671,7 +669,7 @@ return; } - if (input.size() > kMaxListSize) { + if (input.size() > PaymentRequest::kMaxListSize) { exception_state.ThrowTypeError( "At most 1024 payment methods are supported"); return; @@ -699,14 +697,14 @@ return; } - if (supported_methods.size() > kMaxListSize) { + if (supported_methods.size() > PaymentRequest::kMaxListSize) { exception_state.ThrowTypeError( "At most 1024 payment method identifiers are supported"); return; } for (const String identifier : supported_methods) { - if (identifier.length() > kMaxStringLength) { + if (identifier.length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError( "A payment method identifier cannot be longer than 1024 " "characters"); @@ -1005,7 +1003,8 @@ return; } - if (details.hasId() && details.id().length() > kMaxStringLength) { + if (details.hasId() && + details.id().length() > PaymentRequest::kMaxStringLength) { exception_state.ThrowTypeError("ID cannot be longer than 1024 characters"); return; }
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.h b/third_party/WebKit/Source/modules/payments/PaymentRequest.h index 67efe76c..3e33d04 100644 --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
@@ -89,6 +89,15 @@ void OnCompleteTimeoutForTesting(); + enum { + // Implementation defined constants controlling the allowed list length + kMaxListSize = 1024, + // ... and string length + kMaxStringLength = 1024, + // ... and JSON length. + kMaxJSONStringLength = 1048576 + }; + private: PaymentRequest(ExecutionContext*, const HeapVector<PaymentMethodData>&,