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

Unified Diff: Source/modules/mediasource/WebKitSourceBuffer.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/mediasource/WebKitSourceBuffer.h ('k') | Source/modules/mediastream/MediaConstraintsImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediasource/WebKitSourceBuffer.cpp
diff --git a/Source/modules/mediasource/WebKitSourceBuffer.cpp b/Source/modules/mediasource/WebKitSourceBuffer.cpp
index efbc916c86b42a05d8aba99ab662f4f805dca43e..d21ce59e9ba9b1c7e36434c6d8c37e277d9ad744 100644
--- a/Source/modules/mediasource/WebKitSourceBuffer.cpp
+++ b/Source/modules/mediasource/WebKitSourceBuffer.cpp
@@ -31,8 +31,6 @@
#include "config.h"
#include "modules/mediasource/WebKitSourceBuffer.h"
-#include "bindings/v8/ExceptionState.h"
-#include "core/dom/ExceptionCode.h"
#include "core/html/TimeRanges.h"
#include "core/platform/graphics/SourceBufferPrivate.h"
#include "modules/mediasource/WebKitMediaSource.h"
@@ -59,13 +57,13 @@ WebKitSourceBuffer::~WebKitSourceBuffer()
{
}
-PassRefPtr<TimeRanges> WebKitSourceBuffer::buffered(ExceptionState& es) const
+PassRefPtr<TimeRanges> WebKitSourceBuffer::buffered(ExceptionCode& ec) const
{
// Section 3.1 buffered attribute steps.
// 1. If this object has been removed from the sourceBuffers attribute of the parent media source then throw an
// InvalidStateError exception and abort these steps.
if (isRemoved()) {
- es.throwDOMException(InvalidStateError);
+ ec = InvalidStateError;
return 0;
}
@@ -78,13 +76,13 @@ double WebKitSourceBuffer::timestampOffset() const
return m_timestampOffset;
}
-void WebKitSourceBuffer::setTimestampOffset(double offset, ExceptionState& es)
+void WebKitSourceBuffer::setTimestampOffset(double offset, ExceptionCode& ec)
{
// Section 3.1 timestampOffset attribute setter steps.
// 1. If this object has been removed from the sourceBuffers attribute of the parent media source then throw an
// InvalidStateError exception and abort these steps.
if (isRemoved()) {
- es.throwDOMException(InvalidStateError);
+ ec = InvalidStateError;
return;
}
@@ -96,7 +94,7 @@ void WebKitSourceBuffer::setTimestampOffset(double offset, ExceptionState& es)
// 5. If this object is waiting for the end of a media segment to be appended, then throw an InvalidStateError
// and abort these steps.
if (!m_private->setTimestampOffset(offset)) {
- es.throwDOMException(InvalidStateError);
+ ec = InvalidStateError;
return;
}
@@ -104,21 +102,21 @@ void WebKitSourceBuffer::setTimestampOffset(double offset, ExceptionState& es)
m_timestampOffset = offset;
}
-void WebKitSourceBuffer::append(PassRefPtr<Uint8Array> data, ExceptionState& es)
+void WebKitSourceBuffer::append(PassRefPtr<Uint8Array> data, ExceptionCode& ec)
{
// SourceBuffer.append() steps from October 1st version of the Media Source Extensions spec.
// https://dvcs.w3.org/hg/html-media/raw-file/7bab66368f2c/media-source/media-source.html#dom-append
// 2. If data is null then throw an InvalidAccessError exception and abort these steps.
if (!data) {
- es.throwDOMException(InvalidAccessError);
+ ec = InvalidAccessError;
return;
}
// 3. If this object has been removed from the sourceBuffers attribute of media source then throw
// an InvalidStateError exception and abort these steps.
if (isRemoved()) {
- es.throwDOMException(InvalidStateError);
+ ec = InvalidStateError;
return;
}
@@ -131,7 +129,7 @@ void WebKitSourceBuffer::append(PassRefPtr<Uint8Array> data, ExceptionState& es)
m_private->append(data->data(), data->length());
}
-void WebKitSourceBuffer::abort(ExceptionState& es)
+void WebKitSourceBuffer::abort(ExceptionCode& ec)
{
// Section 3.2 abort() method steps.
// 1. If this object has been removed from the sourceBuffers attribute of the parent media source
@@ -139,7 +137,7 @@ void WebKitSourceBuffer::abort(ExceptionState& es)
// 2. If the readyState attribute of the parent media source is not in the "open" state
// then throw an InvalidStateError exception and abort these steps.
if (isRemoved() || !m_source->isOpen()) {
- es.throwDOMException(InvalidStateError);
+ ec = InvalidStateError;
return;
}
« no previous file with comments | « Source/modules/mediasource/WebKitSourceBuffer.h ('k') | Source/modules/mediastream/MediaConstraintsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698