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

Unified Diff: third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.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/ScriptProcessorNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp
index b2d7256e1466b187347a0c506854ee43de8bab50..4fbd13316293d35947c1e64004d34a9080ddc2c8 100644
--- a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp
@@ -174,17 +174,21 @@ void ScriptProcessorHandler::Process(size_t frames_to_process) {
for (unsigned i = 0; i < number_of_input_channels; ++i)
internal_input_bus_->SetChannelMemory(
- i, input_buffer->getChannelData(i)->Data() + buffer_read_write_index_,
+ i,
+ input_buffer->getChannelData(i).View()->Data() +
+ buffer_read_write_index_,
frames_to_process);
if (number_of_input_channels)
internal_input_bus_->CopyFrom(*input_bus);
// Copy from the output buffer to the output.
- for (unsigned i = 0; i < number_of_output_channels; ++i)
+ for (unsigned i = 0; i < number_of_output_channels; ++i) {
memcpy(output_bus->Channel(i)->MutableData(),
- output_buffer->getChannelData(i)->Data() + buffer_read_write_index_,
+ output_buffer->getChannelData(i).View()->Data() +
+ buffer_read_write_index_,
sizeof(float) * frames_to_process);
+ }
// Update the buffering index.
buffer_read_write_index_ =

Powered by Google App Engine
This is Rietveld 408576698