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

Unified Diff: Source/modules/mediastream/RTCSessionDescription.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/RTCSessionDescription.cpp
diff --git a/Source/modules/mediastream/RTCSessionDescription.cpp b/Source/modules/mediastream/RTCSessionDescription.cpp
index cdea6801ca9d4da2580b58fe58927e4f15770caf..b4f668e4c2481212eea6fefaa7b8a33849ab28dc 100644
--- a/Source/modules/mediastream/RTCSessionDescription.cpp
+++ b/Source/modules/mediastream/RTCSessionDescription.cpp
@@ -32,6 +32,7 @@
#include "modules/mediastream/RTCSessionDescription.h"
#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/DictionaryHelper.h"
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
@@ -50,14 +51,14 @@ static String constructIllegalTypeExceptionMessage(const String& type)
RTCSessionDescription* RTCSessionDescription::create(const Dictionary& descriptionInitDict, ExceptionState& exceptionState)
{
String type;
- bool ok = descriptionInitDict.get("type", type);
+ bool ok = DictionaryHelper::get(descriptionInitDict, "type", type);
if (ok && !verifyType(type)) {
exceptionState.throwDOMException(TypeMismatchError, constructIllegalTypeExceptionMessage(type));
return nullptr;
}
String sdp;
- descriptionInitDict.get("sdp", sdp);
+ DictionaryHelper::get(descriptionInitDict, "sdp", sdp);
return new RTCSessionDescription(blink::WebRTCSessionDescription(type, sdp));
}

Powered by Google App Engine
This is Rietveld 408576698