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

Unified Diff: Source/modules/serviceworkers/Headers.cpp

Issue 534133002: [WIP] bindings: Introduce PropertyBag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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: Source/modules/serviceworkers/Headers.cpp
diff --git a/Source/modules/serviceworkers/Headers.cpp b/Source/modules/serviceworkers/Headers.cpp
index ea86990dfe462b396a0e0c6a3b9af7e038d9e592..0902a14cb26f642b33b757fc727084e5b9ea979a 100644
--- a/Source/modules/serviceworkers/Headers.cpp
+++ b/Source/modules/serviceworkers/Headers.cpp
@@ -248,7 +248,7 @@ void Headers::fillWith(const Dictionary& object, ExceptionState& exceptionState)
// http://fetch.spec.whatwg.org/#headers-class
// FIXME: Support sequence<sequence<ByteString>>.
Vector<String> keyValuePair;
- if (DictionaryHelper::get(object, keys[0], keyValuePair)) {
+ if (object.get(keys[0], keyValuePair)) {
// "2. Otherwise, if |object| is a sequence, then for each |header| in
// |object|, run these substeps:
// 1. If |header| does not contain exactly two items, throw a
@@ -258,7 +258,7 @@ void Headers::fillWith(const Dictionary& object, ExceptionState& exceptionState)
for (size_t i = 0; i < keys.size(); ++i) {
// We've already got the keyValuePair for key[0].
if (i > 0) {
- if (!DictionaryHelper::get(object, keys[i], keyValuePair)) {
+ if (!object.get(keys[i], keyValuePair)) {
exceptionState.throwTypeError("Invalid value");
return;
}
@@ -283,7 +283,7 @@ void Headers::fillWith(const Dictionary& object, ExceptionState& exceptionState)
// FIXME: Support OpenEndedDictionary<ByteString>.
for (size_t i = 0; i < keys.size(); ++i) {
String value;
- if (!DictionaryHelper::get(object, keys[i], value)) {
+ if (!object.get(keys[i], value)) {
exceptionState.throwTypeError("Invalid value");
return;
}
« no previous file with comments | « Source/modules/notifications/Notification.cpp ('k') | Source/modules/serviceworkers/RegistrationOptionList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698