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

Unified Diff: Source/modules/mediastream/RTCSessionDescription.cpp

Issue 19724003: Revert "Transition modules/** to use ExceptionState" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « Source/modules/mediastream/RTCSessionDescription.h ('k') | Source/modules/mediastream/UserMediaRequest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediastream/RTCSessionDescription.cpp
diff --git a/Source/modules/mediastream/RTCSessionDescription.cpp b/Source/modules/mediastream/RTCSessionDescription.cpp
index 4a2b18e16036ff9f32715413c6614bba974190cc..578c1538967ae1c15160aa747c4195c254a9f5bb 100644
--- a/Source/modules/mediastream/RTCSessionDescription.cpp
+++ b/Source/modules/mediastream/RTCSessionDescription.cpp
@@ -33,7 +33,6 @@
#include "modules/mediastream/RTCSessionDescription.h"
#include "bindings/v8/Dictionary.h"
-#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "public/platform/WebRTCSessionDescription.h"
@@ -44,19 +43,19 @@ static bool verifyType(const String& type)
return type == "offer" || type == "pranswer" || type == "answer";
}
-PassRefPtr<RTCSessionDescription> RTCSessionDescription::create(const Dictionary& dictionary, ExceptionState& es)
+PassRefPtr<RTCSessionDescription> RTCSessionDescription::create(const Dictionary& dictionary, ExceptionCode& ec)
{
String type;
bool ok = dictionary.get("type", type);
if (!ok || !verifyType(type)) {
- es.throwDOMException(TypeMismatchError);
+ ec = TypeMismatchError;
return 0;
}
String sdp;
ok = dictionary.get("sdp", sdp);
if (!ok || sdp.isEmpty()) {
- es.throwDOMException(TypeMismatchError);
+ ec = TypeMismatchError;
return 0;
}
@@ -83,12 +82,12 @@ String RTCSessionDescription::type()
return m_webSessionDescription.type();
}
-void RTCSessionDescription::setType(const String& type, ExceptionState& es)
+void RTCSessionDescription::setType(const String& type, ExceptionCode& ec)
{
if (verifyType(type))
m_webSessionDescription.setType(type);
else
- es.throwDOMException(TypeMismatchError);
+ ec = TypeMismatchError;
}
String RTCSessionDescription::sdp()
@@ -96,7 +95,7 @@ String RTCSessionDescription::sdp()
return m_webSessionDescription.sdp();
}
-void RTCSessionDescription::setSdp(const String& sdp, ExceptionState& es)
+void RTCSessionDescription::setSdp(const String& sdp, ExceptionCode& ec)
{
m_webSessionDescription.setSDP(sdp);
}
« no previous file with comments | « Source/modules/mediastream/RTCSessionDescription.h ('k') | Source/modules/mediastream/UserMediaRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698