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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: update comment, add TODO 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 140a6fc44d6c3a4212b62f4529c49945123f2d3e..349120a2d7f59949a02ba3111ed80d5ab77140f9 100644
--- a/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp
@@ -126,49 +126,52 @@ IIRProcessor* IIRFilterNode::IirProcessor() const {
static_cast<AudioBasicProcessorHandler&>(Handler()).Processor());
}
-void IIRFilterNode::getFrequencyResponse(const DOMFloat32Array* frequency_hz,
- DOMFloat32Array* mag_response,
- DOMFloat32Array* phase_response,
- ExceptionState& exception_state) {
- if (!frequency_hz) {
+void IIRFilterNode::getFrequencyResponse(
+ NotShared<const DOMFloat32Array> frequency_hz,
+ NotShared<DOMFloat32Array> mag_response,
+ NotShared<DOMFloat32Array> phase_response,
+ ExceptionState& exception_state) {
+ if (!frequency_hz.View()) {
exception_state.ThrowDOMException(kNotSupportedError,
"frequencyHz array cannot be null");
return;
}
- if (!mag_response) {
+ if (!mag_response.View()) {
exception_state.ThrowDOMException(kNotSupportedError,
"magResponse array cannot be null");
return;
}
- if (!phase_response) {
+ if (!phase_response.View()) {
exception_state.ThrowDOMException(kNotSupportedError,
"phaseResponse array cannot be null");
return;
}
- unsigned frequency_hz_length = frequency_hz->length();
+ unsigned frequency_hz_length = frequency_hz.View()->length();
- if (mag_response->length() < frequency_hz_length) {
+ if (mag_response.View()->length() < frequency_hz_length) {
exception_state.ThrowDOMException(
kNotSupportedError,
ExceptionMessages::IndexExceedsMinimumBound(
- "magResponse length", mag_response->length(), frequency_hz_length));
+ "magResponse length", mag_response.View()->length(),
+ frequency_hz_length));
return;
}
- if (phase_response->length() < frequency_hz_length) {
+ if (phase_response.View()->length() < frequency_hz_length) {
exception_state.ThrowDOMException(
- kNotSupportedError, ExceptionMessages::IndexExceedsMinimumBound(
- "phaseResponse length",
- phase_response->length(), frequency_hz_length));
+ kNotSupportedError,
+ ExceptionMessages::IndexExceedsMinimumBound(
+ "phaseResponse length", phase_response.View()->length(),
+ frequency_hz_length));
return;
}
IirProcessor()->GetFrequencyResponse(
- frequency_hz_length, frequency_hz->Data(), mag_response->Data(),
- phase_response->Data());
+ frequency_hz_length, frequency_hz.View()->Data(),
+ mag_response.View()->Data(), phase_response.View()->Data());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698