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

Unified Diff: Source/bindings/core/v8/custom/V8BlobCustomHelpers.cpp

Issue 373423002: Split Dictionary's get and convert into DictionaryHelper. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed LICENSE and windows build Created 6 years, 5 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/bindings/core/v8/custom/V8BlobCustomHelpers.cpp
diff --git a/Source/bindings/core/v8/custom/V8BlobCustomHelpers.cpp b/Source/bindings/core/v8/custom/V8BlobCustomHelpers.cpp
index e508bd40cb795bca0301d8298331dd0e4e1b7da2..c9c6850c092967ca8dae2952c5429df2638a54b8 100644
--- a/Source/bindings/core/v8/custom/V8BlobCustomHelpers.cpp
+++ b/Source/bindings/core/v8/custom/V8BlobCustomHelpers.cpp
@@ -32,6 +32,7 @@
#include "bindings/core/v8/custom/V8BlobCustomHelpers.h"
#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/DictionaryHelper.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8Blob.h"
@@ -72,7 +73,7 @@ bool ParsedProperties::parseBlobPropertyBag(v8::Local<v8::Value> propertyBag, co
TONATIVE_DEFAULT(Dictionary, dictionary, Dictionary(propertyBag, isolate), false);
String endings;
- TONATIVE_DEFAULT(bool, containsEndings, dictionary.get("endings", endings), false);
+ TONATIVE_DEFAULT(bool, containsEndings, DictionaryHelper::get(dictionary, "endings", endings), false);
if (containsEndings) {
if (endings != "transparent" && endings != "native") {
exceptionState.throwTypeError("The 'endings' property must be either 'transparent' or 'native'.");
@@ -82,7 +83,7 @@ bool ParsedProperties::parseBlobPropertyBag(v8::Local<v8::Value> propertyBag, co
m_normalizeLineEndingsToNative = true;
}
- TONATIVE_DEFAULT(bool, containsType, dictionary.get("type", m_contentType), false);
+ TONATIVE_DEFAULT(bool, containsType, DictionaryHelper::get(dictionary, "type", m_contentType), false);
if (containsType) {
if (!m_contentType.containsOnlyASCII()) {
exceptionState.throwDOMException(SyntaxError, "The 'type' property must consist of ASCII characters.");
@@ -95,7 +96,7 @@ bool ParsedProperties::parseBlobPropertyBag(v8::Local<v8::Value> propertyBag, co
return true;
v8::Local<v8::Value> lastModified;
- TONATIVE_DEFAULT(bool, containsLastModified, dictionary.get("lastModified", lastModified), false);
+ TONATIVE_DEFAULT(bool, containsLastModified, DictionaryHelper::get(dictionary, "lastModified", lastModified), false);
if (containsLastModified) {
TONATIVE_DEFAULT(long long, lastModifiedInt, toInt64(lastModified), false);
setLastModified(static_cast<double>(lastModifiedInt) / msPerSecond);

Powered by Google App Engine
This is Rietveld 408576698