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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: add some layout tests 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 0c94207f05a6498761975a2718100596bcdfc644..1a32adcb8f169a8f60a72ed81f484e0ad5a3b737 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* frequencyHz,
- DOMFloat32Array* magResponse,
- DOMFloat32Array* phaseResponse,
- ExceptionState& exceptionState) {
- if (!frequencyHz) {
+void IIRFilterNode::getFrequencyResponse(
+ NotShared<const DOMFloat32Array> frequencyHz,
+ NotShared<DOMFloat32Array> magResponse,
+ 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