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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp

Issue 1481793002: Drop [LegacyInterfaceTypeChecking] where trivial in Web Audio (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self.hasOwnProperty(errorType) Created 5 years, 1 month 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
Index: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
index 9b627c3fd9f540e636430a9b9931115bafceecf0..6490741d7cacccbd52a5a4a1752800944b8bf2a7 100644
--- a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
@@ -198,12 +198,6 @@ void AbstractAudioContext::decodeAudioData(DOMArrayBuffer* audioData, AudioBuffe
return;
}
- if (!audioData) {
- exceptionState.throwDOMException(
- SyntaxError,
- "invalid ArrayBuffer for audioData.");
- return;
- }
m_audioDecoder.decodeAsync(audioData, sampleRate(), successCallback, errorCallback);
}
@@ -233,13 +227,6 @@ MediaElementAudioSourceNode* AbstractAudioContext::createMediaElementSource(HTML
return nullptr;
}
- if (!mediaElement) {
- exceptionState.throwDOMException(
- InvalidStateError,
- "invalid HTMLMedialElement.");
- return nullptr;
- }
-
// First check if this media element already has a source node.
if (mediaElement->audioSourceNode()) {
exceptionState.throwDOMException(
@@ -265,13 +252,6 @@ MediaStreamAudioSourceNode* AbstractAudioContext::createMediaStreamSource(MediaS
return nullptr;
}
- if (!mediaStream) {
- exceptionState.throwDOMException(
- InvalidStateError,
- "invalid MediaStream source");
- return nullptr;
- }
-
MediaStreamTrackVector audioTracks = mediaStream->getAudioTracks();
if (audioTracks.isEmpty()) {
exceptionState.throwDOMException(
@@ -558,20 +538,6 @@ PeriodicWave* AbstractAudioContext::createPeriodicWave(DOMFloat32Array* real, DO
return nullptr;
}
- if (!real) {
- exceptionState.throwDOMException(
- SyntaxError,
- "invalid real array");
- return nullptr;
- }
-
- if (!imag) {
- exceptionState.throwDOMException(
- SyntaxError,
- "invalid imaginary array");
- return nullptr;
- }
-
if (real->length() != imag->length()) {
exceptionState.throwDOMException(
IndexSizeError,

Powered by Google App Engine
This is Rietveld 408576698