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

Unified Diff: third_party/WebKit/Source/modules/webmidi/MIDIOutput.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/webmidi/MIDIOutput.cpp
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp b/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
index 9070fadd5724877e28b1ebad9f92c2c7e870f10b..e2872679ec5e51f322877652a8753fd21a437cdb 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
@@ -221,7 +221,7 @@ MIDIOutput::MIDIOutput(MIDIAccess* access,
MIDIOutput::~MIDIOutput() {}
-void MIDIOutput::send(DOMUint8Array* array,
+void MIDIOutput::send(NotShared<DOMUint8Array> array,
double timestamp,
ExceptionState& exception_state) {
DCHECK(array);
@@ -233,10 +233,11 @@ void MIDIOutput::send(DOMUint8Array* array,
// This should be performed even if |array| is invalid.
open();
- if (MessageValidator::Validate(array, exception_state,
- midiAccess()->sysexEnabled()))
- midiAccess()->SendMIDIData(port_index_, array->Data(), array->length(),
- timestamp);
+ if (MessageValidator::Validate(array.View(), exception_state,
+ midiAccess()->sysexEnabled())) {
+ midiAccess()->SendMIDIData(port_index_, array.View()->Data(),
+ array.View()->length(), timestamp);
+ }
}
void MIDIOutput::send(Vector<unsigned> unsigned_data,
@@ -260,10 +261,11 @@ void MIDIOutput::send(Vector<unsigned> unsigned_data,
array_data[i] = unsigned_data[i] & 0xff;
}
- send(array, timestamp, exception_state);
+ send(NotShared<DOMUint8Array>(array), timestamp, exception_state);
}
-void MIDIOutput::send(DOMUint8Array* data, ExceptionState& exception_state) {
+void MIDIOutput::send(NotShared<DOMUint8Array> data,
+ ExceptionState& exception_state) {
DCHECK(data);
send(data, 0.0, exception_state);
}
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIOutput.h ('k') | third_party/WebKit/Source/modules/websockets/DOMWebSocket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698