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

Unified Diff: Source/modules/mediastream/MediaStream.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/MediaStream.h ('k') | Source/modules/mediastream/MediaStreamTrack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediastream/MediaStream.cpp
diff --git a/Source/modules/mediastream/MediaStream.cpp b/Source/modules/mediastream/MediaStream.cpp
index 1ecb0f6799bbf0a8ff02ae0f4b099cab21219a8c..0fac12fa6b94e591e234008afbbcdd97d8f603fc 100644
--- a/Source/modules/mediastream/MediaStream.cpp
+++ b/Source/modules/mediastream/MediaStream.cpp
@@ -26,7 +26,6 @@
#include "config.h"
#include "modules/mediastream/MediaStream.h"
-#include "bindings/v8/ExceptionState.h"
#include "core/dom/Event.h"
#include "core/dom/ExceptionCode.h"
#include "core/platform/mediastream/MediaStreamCenter.h"
@@ -133,15 +132,15 @@ bool MediaStream::ended() const
return m_stopped || m_descriptor->ended();
}
-void MediaStream::addTrack(PassRefPtr<MediaStreamTrack> prpTrack, ExceptionState& es)
+void MediaStream::addTrack(PassRefPtr<MediaStreamTrack> prpTrack, ExceptionCode& ec)
{
if (ended()) {
- es.throwDOMException(InvalidStateError);
+ ec = InvalidStateError;
return;
}
if (!prpTrack) {
- es.throwDOMException(TypeMismatchError);
+ ec = TypeMismatchError;
return;
}
@@ -167,15 +166,15 @@ void MediaStream::addTrack(PassRefPtr<MediaStreamTrack> prpTrack, ExceptionState
MediaStreamCenter::instance().didAddMediaStreamTrack(m_descriptor.get(), newTrack->component());
}
-void MediaStream::removeTrack(PassRefPtr<MediaStreamTrack> prpTrack, ExceptionState& es)
+void MediaStream::removeTrack(PassRefPtr<MediaStreamTrack> prpTrack, ExceptionCode& ec)
{
if (ended()) {
- es.throwDOMException(InvalidStateError);
+ ec = InvalidStateError;
return;
}
if (!prpTrack) {
- es.throwDOMException(TypeMismatchError);
+ ec = TypeMismatchError;
return;
}
« no previous file with comments | « Source/modules/mediastream/MediaStream.h ('k') | Source/modules/mediastream/MediaStreamTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698