| 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 576b0adc19411c9eca911e46b2ddb62fa9a50a3c..ae35c35e4a07bc7dc369323e1a20bc3af440d30c 100644
|
| --- a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
|
| +++ b/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
|
| @@ -221,10 +221,16 @@ MIDIOutput::MIDIOutput(MIDIAccess* access,
|
|
|
| MIDIOutput::~MIDIOutput() {}
|
|
|
| -void MIDIOutput::send(DOMUint8Array* array,
|
| +void MIDIOutput::send(const MaybeShared<DOMUint8Array>& maybeShared,
|
| double timestamp,
|
| ExceptionState& exceptionState) {
|
| - DCHECK(array);
|
| + DCHECK(maybeShared);
|
| + if (maybeShared.isShared()) {
|
| + exceptionState.throwTypeError(
|
| + "The array is backed by a SharedArrayBuffer.");
|
| + return;
|
| + }
|
| + DOMUint8Array* array = maybeShared.viewNotShared();
|
|
|
| if (timestamp == 0.0)
|
| timestamp = now(getExecutionContext());
|
| @@ -263,7 +269,8 @@ void MIDIOutput::send(Vector<unsigned> unsignedData,
|
| send(array, timestamp, exceptionState);
|
| }
|
|
|
| -void MIDIOutput::send(DOMUint8Array* data, ExceptionState& exceptionState) {
|
| +void MIDIOutput::send(const MaybeShared<DOMUint8Array>& data,
|
| + ExceptionState& exceptionState) {
|
| DCHECK(data);
|
| send(data, 0.0, exceptionState);
|
| }
|
|
|