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

Unified Diff: third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.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/ScriptProcessorNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp
index d84fd23d118794f82bbbb8eda325e73811c3928a..07970cce180b0354effe2f2c6380698b1da7210a 100644
--- a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp
@@ -170,17 +170,20 @@ void ScriptProcessorHandler::process(size_t framesToProcess) {
for (unsigned i = 0; i < numberOfInputChannels; ++i)
m_internalInputBus->setChannelMemory(
- i, inputBuffer->getChannelData(i)->data() + m_bufferReadWriteIndex,
+ i,
+ inputBuffer->getChannelData(i).view()->data() + m_bufferReadWriteIndex,
framesToProcess);
if (numberOfInputChannels)
m_internalInputBus->copyFrom(*inputBus);
// Copy from the output buffer to the output.
- for (unsigned i = 0; i < numberOfOutputChannels; ++i)
- memcpy(outputBus->channel(i)->mutableData(),
- outputBuffer->getChannelData(i)->data() + m_bufferReadWriteIndex,
- sizeof(float) * framesToProcess);
+ for (unsigned i = 0; i < numberOfOutputChannels; ++i) {
+ memcpy(
+ outputBus->channel(i)->mutableData(),
+ outputBuffer->getChannelData(i).view()->data() + m_bufferReadWriteIndex,
+ sizeof(float) * framesToProcess);
+ }
// Update the buffering index.
m_bufferReadWriteIndex =

Powered by Google App Engine
This is Rietveld 408576698