| 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
|
|
|