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

Unified Diff: Source/modules/mediastream/MediaConstraintsImpl.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/modules/mediastream/MediaConstraintsImpl.cpp
diff --git a/Source/modules/mediastream/MediaConstraintsImpl.cpp b/Source/modules/mediastream/MediaConstraintsImpl.cpp
index b60164f6ef994ca73c34abf8ac5119755db5175e..570b6719d16c3d0f73c654f87a78d9a12db62b9f 100644
--- a/Source/modules/mediastream/MediaConstraintsImpl.cpp
+++ b/Source/modules/mediastream/MediaConstraintsImpl.cpp
@@ -34,6 +34,7 @@
#include "bindings/core/v8/ArrayValue.h"
#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/DictionaryHelper.h"
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "wtf/HashMap.h"
@@ -79,7 +80,7 @@ static bool parse(const Dictionary& constraintsDictionary, blink::WebVector<blin
Vector<blink::WebMediaConstraint> optionalConstraintsVector;
if (names.contains(optionalName)) {
ArrayValue optionalConstraints;
- bool ok = constraintsDictionary.get(optionalName, optionalConstraints);
+ bool ok = DictionaryHelper::get(constraintsDictionary, optionalName, optionalConstraints);
if (!ok || optionalConstraints.isUndefinedOrNull())
return false;
@@ -99,7 +100,7 @@ static bool parse(const Dictionary& constraintsDictionary, blink::WebVector<blin
return false;
String key = localNames[0];
String value;
- ok = constraint.get(key, value);
+ ok = DictionaryHelper::get(constraint, key, value);
if (!ok)
return false;
optionalConstraintsVector.append(blink::WebMediaConstraint(key, value));

Powered by Google App Engine
This is Rietveld 408576698