| 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;
|
| }
|
|
|
|
|