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

Unified Diff: Source/modules/mediasource/SourceBuffer.cpp

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/MediaSourceBase.cpp ('k') | Source/modules/mediasource/WebKitMediaSource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/modules/mediasource/MediaSourceBase.cpp ('k') | Source/modules/mediasource/WebKitMediaSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698