| Index: Source/modules/mediasource/SourceBuffer.cpp
|
| diff --git a/Source/modules/mediasource/SourceBuffer.cpp b/Source/modules/mediasource/SourceBuffer.cpp
|
| index 6885ce5055e9dcf8e8935ae822ec7c31acb9f7ec..6f7c9200158e0c39c440a7eba80312a368574694 100644
|
| --- a/Source/modules/mediasource/SourceBuffer.cpp
|
| +++ b/Source/modules/mediasource/SourceBuffer.cpp
|
| @@ -92,7 +92,7 @@ PassRefPtr<TimeRanges> SourceBuffer::buffered(ExceptionState& es) const
|
| // 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);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return 0;
|
| }
|
|
|
| @@ -113,7 +113,7 @@ void SourceBuffer::setTimestampOffset(double offset, ExceptionState& es)
|
| // InvalidStateError exception and abort these steps.
|
| // 3. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
|
| if (isRemoved() || m_updating) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return;
|
| }
|
|
|
| @@ -127,7 +127,7 @@ void SourceBuffer::setTimestampOffset(double offset, ExceptionState& es)
|
| //
|
| // FIXME: Add step 6 text when mode attribute is implemented.
|
| if (!m_private->setTimestampOffset(offset)) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return;
|
| }
|
|
|
| @@ -146,7 +146,7 @@ void SourceBuffer::setAppendWindowStart(double start, ExceptionState& es)
|
| if (std::isnan(start)
|
| || start == std::numeric_limits<double>::infinity()
|
| || start == -std::numeric_limits<double>::infinity()) {
|
| - es.throwDOMException(TypeMismatchError);
|
| + es.throwUninformativeAndGenericDOMException(TypeMismatchError);
|
| return;
|
| }
|
|
|
| @@ -155,14 +155,14 @@ void SourceBuffer::setAppendWindowStart(double start, ExceptionState& es)
|
| // InvalidStateError exception and abort these steps.
|
| // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
|
| if (isRemoved() || m_updating) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return;
|
| }
|
|
|
| // 3. If the new value is less than 0 or greater than or equal to appendWindowEnd then throw an InvalidAccessError
|
| // exception and abort these steps.
|
| if (start < 0 || start >= m_appendWindowEnd) {
|
| - es.throwDOMException(InvalidAccessError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| return;
|
| }
|
|
|
| @@ -184,7 +184,7 @@ void SourceBuffer::setAppendWindowEnd(double end, ExceptionState& es)
|
| // InvalidStateError exception and abort these steps.
|
| // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
|
| if (isRemoved() || m_updating) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return;
|
| }
|
|
|
| @@ -192,7 +192,7 @@ void SourceBuffer::setAppendWindowEnd(double end, ExceptionState& es)
|
| // 4. If the new value is less than or equal to appendWindowStart then throw an InvalidAccessError
|
| // exception and abort these steps.
|
| if (std::isnan(end) || end <= m_appendWindowStart) {
|
| - es.throwDOMException(InvalidAccessError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| return;
|
| }
|
|
|
| @@ -208,7 +208,7 @@ void SourceBuffer::appendBuffer(PassRefPtr<ArrayBuffer> data, ExceptionState& es
|
| // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data
|
| // 1. If data is null then throw an InvalidAccessError exception and abort these steps.
|
| if (!data) {
|
| - es.throwDOMException(InvalidAccessError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| return;
|
| }
|
|
|
| @@ -221,7 +221,7 @@ void SourceBuffer::appendBuffer(PassRefPtr<ArrayBufferView> data, ExceptionState
|
| // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data
|
| // 1. If data is null then throw an InvalidAccessError exception and abort these steps.
|
| if (!data) {
|
| - es.throwDOMException(InvalidAccessError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| return;
|
| }
|
|
|
| @@ -251,7 +251,7 @@ void SourceBuffer::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);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return;
|
| }
|
|
|
| @@ -274,7 +274,7 @@ void SourceBuffer::remove(double start, double end, ExceptionState& es)
|
| // 1. If start is negative or greater than duration, then throw an InvalidAccessError exception and abort these steps.
|
| // 2. If end is less than or equal to start, then throw an InvalidAccessError exception and abort these steps.
|
| if (start < 0 || (m_source && (std::isnan(m_source->duration()) || start > m_source->duration())) || end <= start) {
|
| - es.throwDOMException(InvalidAccessError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| return;
|
| }
|
|
|
| @@ -282,7 +282,7 @@ void SourceBuffer::remove(double start, double end, ExceptionState& es)
|
| // InvalidStateError exception and abort these steps.
|
| // 4. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
|
| if (isRemoved() || m_updating) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return;
|
| }
|
|
|
| @@ -400,7 +400,7 @@ void SourceBuffer::appendBufferInternal(const unsigned char* data, unsigned size
|
| // 2. If this object has been removed from the sourceBuffers attribute of the parent media source then throw an InvalidStateError exception and abort these steps.
|
| // 3. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
|
| if (isRemoved() || m_updating) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return;
|
| }
|
|
|
| @@ -481,7 +481,7 @@ void SourceBuffer::appendStreamInternal(PassRefPtr<Stream> stream, ExceptionStat
|
| // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-appendStream-void-Stream-stream-unsigned-long-long-maxSize
|
| // 1. If stream is null then throw an InvalidAccessError exception and abort these steps.
|
| if (!stream || stream->isNeutered()) {
|
| - es.throwDOMException(InvalidAccessError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidAccessError);
|
| return;
|
| }
|
|
|
| @@ -491,7 +491,7 @@ void SourceBuffer::appendStreamInternal(PassRefPtr<Stream> stream, ExceptionStat
|
| // 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.
|
| // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
|
| if (isRemoved() || m_updating) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return;
|
| }
|
|
|
|
|