Index: Source/modules/webaudio/AnalyserNode.cpp |
diff --git a/Source/modules/webaudio/AnalyserNode.cpp b/Source/modules/webaudio/AnalyserNode.cpp |
index 128840ef9b0e2787c49a12668f9f3992613f2fc4..bacfbdaee5bc5045e54df40aa5b400b1569d2010 100644 |
--- a/Source/modules/webaudio/AnalyserNode.cpp |
+++ b/Source/modules/webaudio/AnalyserNode.cpp |
@@ -28,6 +28,7 @@ |
#include "modules/webaudio/AnalyserNode.h" |
+#include "bindings/v8/ExceptionMessages.h" |
#include "bindings/v8/ExceptionState.h" |
#include "core/dom/ExceptionCode.h" |
#include "modules/webaudio/AudioNodeInput.h" |
@@ -75,8 +76,14 @@ void AnalyserNode::reset() |
void AnalyserNode::setFftSize(unsigned size, ExceptionState& es) |
{ |
- if (!m_analyser.setFftSize(size)) |
- es.throwUninformativeAndGenericDOMException(NotSupportedError); |
+ if (!m_analyser.setFftSize(size)) { |
+ es.throwDOMException( |
+ NotSupportedError, |
+ ExceptionMessages::failedToSet( |
+ "fftSize", |
+ "AnalyserNode", |
+ "FFT size is out of range or not a power of two.")); |
+ } |
} |
} // namespace WebCore |