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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: remove unused checks Created 3 years, 8 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
Index: third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp b/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp
index d8e5c2ed20de0550fcad33431d9c66c1cbb30e42..a155d23a2c8fd5f20440a3a24bd94737b598e0fb 100644
--- a/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp
@@ -149,49 +149,52 @@ IIRProcessor* IIRFilterNode::iirProcessor() const {
static_cast<AudioBasicProcessorHandler&>(handler()).processor());
}
-void IIRFilterNode::getFrequencyResponse(const DOMFloat32Array* frequencyHz,
- DOMFloat32Array* magResponse,
- DOMFloat32Array* phaseResponse,
- ExceptionState& exceptionState) {
- if (!frequencyHz) {
+void IIRFilterNode::getFrequencyResponse(
+ const NotShared<const DOMFloat32Array>& frequencyHz,
+ const NotShared<DOMFloat32Array>& magResponse,
+ const NotShared<DOMFloat32Array>& phaseResponse,
+ ExceptionState& exceptionState) {
+ if (!frequencyHz.view()) {
exceptionState.throwDOMException(NotSupportedError,
"frequencyHz array cannot be null");
return;
}
- if (!magResponse) {
+ if (!magResponse.view()) {
exceptionState.throwDOMException(NotSupportedError,
"magResponse array cannot be null");
return;
}
- if (!phaseResponse) {
+ if (!phaseResponse.view()) {
exceptionState.throwDOMException(NotSupportedError,
"phaseResponse array cannot be null");
return;
}
- unsigned frequencyHzLength = frequencyHz->length();
+ unsigned frequencyHzLength = frequencyHz.view()->length();
- if (magResponse->length() < frequencyHzLength) {
+ if (magResponse.view()->length() < frequencyHzLength) {
exceptionState.throwDOMException(
NotSupportedError,
ExceptionMessages::indexExceedsMinimumBound(
- "magResponse length", magResponse->length(), frequencyHzLength));
+ "magResponse length", magResponse.view()->length(),
+ frequencyHzLength));
return;
}
- if (phaseResponse->length() < frequencyHzLength) {
+ if (phaseResponse.view()->length() < frequencyHzLength) {
exceptionState.throwDOMException(
- NotSupportedError, ExceptionMessages::indexExceedsMinimumBound(
- "phaseResponse length", phaseResponse->length(),
- frequencyHzLength));
+ NotSupportedError,
+ ExceptionMessages::indexExceedsMinimumBound(
+ "phaseResponse length", phaseResponse.view()->length(),
+ frequencyHzLength));
return;
}
- iirProcessor()->getFrequencyResponse(frequencyHzLength, frequencyHz->data(),
- magResponse->data(),
- phaseResponse->data());
+ iirProcessor()->getFrequencyResponse(
+ frequencyHzLength, frequencyHz.view()->data(), magResponse.view()->data(),
+ phaseResponse.view()->data());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698