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

Unified Diff: Source/modules/mediastream/RTCIceCandidate.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/RTCIceCandidate.cpp
diff --git a/Source/modules/mediastream/RTCIceCandidate.cpp b/Source/modules/mediastream/RTCIceCandidate.cpp
index 7e479c31a4525ddd1ee1d5f9a915779a373dfc1c..3a61cf792d9b22412068eead0c5f13bf8ca1928b 100644
--- a/Source/modules/mediastream/RTCIceCandidate.cpp
+++ b/Source/modules/mediastream/RTCIceCandidate.cpp
@@ -32,6 +32,7 @@
#include "modules/mediastream/RTCIceCandidate.h"
#include "bindings/core/v8/Dictionary.h"
+#include "bindings/core/v8/DictionaryHelper.h"
#include "bindings/core/v8/ExceptionMessages.h"
#include "bindings/core/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
@@ -41,17 +42,17 @@ namespace WebCore {
RTCIceCandidate* RTCIceCandidate::create(const Dictionary& dictionary, ExceptionState& exceptionState)
{
String candidate;
- bool ok = dictionary.get("candidate", candidate);
+ bool ok = DictionaryHelper::get(dictionary, "candidate", candidate);
if (!ok || !candidate.length()) {
exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::incorrectPropertyType("candidate", "is not a string, or is empty."));
return nullptr;
}
String sdpMid;
- dictionary.get("sdpMid", sdpMid);
+ DictionaryHelper::get(dictionary, "sdpMid", sdpMid);
unsigned short sdpMLineIndex = 0;
- dictionary.get("sdpMLineIndex", sdpMLineIndex);
+ DictionaryHelper::get(dictionary, "sdpMLineIndex", sdpMLineIndex);
return new RTCIceCandidate(blink::WebRTCICECandidate(candidate, sdpMid, sdpMLineIndex));
}

Powered by Google App Engine
This is Rietveld 408576698