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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/MediaSource.cpp ('k') | Source/modules/mediasource/SourceBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediasource/MediaSourceBase.cpp
diff --git a/Source/modules/mediasource/MediaSourceBase.cpp b/Source/modules/mediasource/MediaSourceBase.cpp
index f310147531d9f2662f90dd106a507275e20f5f7f..3f64fee2da4b3ca4fa68d23bfb991ae4ac8878e3 100644
--- a/Source/modules/mediasource/MediaSourceBase.cpp
+++ b/Source/modules/mediasource/MediaSourceBase.cpp
@@ -95,11 +95,11 @@ double MediaSourceBase::duration() const
void MediaSourceBase::setDuration(double duration, ExceptionCode& ec)
{
if (duration < 0.0 || std::isnan(duration)) {
- ec = INVALID_ACCESS_ERR;
+ ec = InvalidAccessError;
return;
}
if (!isOpen()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
m_private->setDuration(duration);
@@ -121,9 +121,9 @@ void MediaSourceBase::endOfStream(const AtomicString& error, ExceptionCode& ec)
// 3.1 http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-endofstream
// 1. If the readyState attribute is not in the "open" state then throw an
- // INVALID_STATE_ERR exception and abort these steps.
+ // InvalidStateError exception and abort these steps.
if (!isOpen()) {
- ec = INVALID_STATE_ERR;
+ ec = InvalidStateError;
return;
}
@@ -136,7 +136,7 @@ void MediaSourceBase::endOfStream(const AtomicString& error, ExceptionCode& ec)
} else if (error == decode) {
eosStatus = MediaSourcePrivate::EosDecodeError;
} else {
- ec = INVALID_ACCESS_ERR;
+ ec = InvalidAccessError;
return;
}
« no previous file with comments | « Source/modules/mediasource/MediaSource.cpp ('k') | Source/modules/mediasource/SourceBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698