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

Unified Diff: Source/modules/mediasource/MediaSource.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/indexeddb/IDBTransaction.cpp ('k') | Source/modules/mediasource/MediaSourceBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediasource/MediaSource.cpp
diff --git a/Source/modules/mediasource/MediaSource.cpp b/Source/modules/mediasource/MediaSource.cpp
index fc59c184b7744e2873a9a09ebac1be5f97ab40e7..4a08b568936d40c396df214f782d52b269465130 100644
--- a/Source/modules/mediasource/MediaSource.cpp
+++ b/Source/modules/mediasource/MediaSource.cpp
@@ -69,10 +69,10 @@ SourceBuffer* MediaSource::addSourceBuffer(const String& type, ExceptionCode& ec
LOG(Media, "MediaSource::addSourceBuffer(%s) %p", type.ascii().data(), this);
// 2.2 https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type
- // 1. If type is null or an empty then throw an INVALID_ACCESS_ERR exception and
+ // 1. If type is null or an empty then throw an InvalidAccessError exception and
// abort these steps.
if (type.isNull() || type.isEmpty()) {
- ec = INVALID_ACCESS_ERR;
+ ec = InvalidAccessError;
return 0;
}
@@ -84,9 +84,9 @@ SourceBuffer* MediaSource::addSourceBuffer(const String& type, ExceptionCode& ec
}
// 4. 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 0;
}
@@ -116,10 +116,10 @@ void MediaSource::removeSourceBuffer(SourceBuffer* buffer, ExceptionCode& ec)
RefPtr<SourceBuffer> protect(buffer);
// 2.2 https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-MediaSource-removeSourceBuffer-void-SourceBuffer-sourceBuffer
- // 1. If sourceBuffer is null then throw an INVALID_ACCESS_ERR exception and
+ // 1. If sourceBuffer is null then throw an InvalidAccessError exception and
// abort these steps.
if (!buffer) {
- ec = INVALID_ACCESS_ERR;
+ ec = InvalidAccessError;
return;
}
« no previous file with comments | « Source/modules/indexeddb/IDBTransaction.cpp ('k') | Source/modules/mediasource/MediaSourceBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698