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

Unified Diff: third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp

Issue 1485443002: Drop [LegacyInterfaceTypeChecking] for the MIDI API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9ea9e0dfdf9266329deb5761592abde71230d524..494578d72c00f5d3f3559f331c66240d2cfc1d6e 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
@@ -196,6 +196,8 @@ MIDIOutput::~MIDIOutput()
void MIDIOutput::send(DOMUint8Array* array, double timestamp, ExceptionState& exceptionState)
{
+ ASSERT(array);
+
if (timestamp == 0.0)
timestamp = now(executionContext());
@@ -203,9 +205,6 @@ void MIDIOutput::send(DOMUint8Array* array, double timestamp, ExceptionState& ex
// This should be performed even if |array| is invalid.
open();
- if (!array)
- return;
-
if (MessageValidator::validate(array, exceptionState, midiAccess()->sysexEnabled()))
midiAccess()->sendMIDIData(m_portIndex, array->data(), array->length(), timestamp);
}
@@ -233,6 +232,7 @@ void MIDIOutput::send(Vector<unsigned> unsignedData, double timestamp, Exception
void MIDIOutput::send(DOMUint8Array* data, ExceptionState& exceptionState)
{
+ ASSERT(data);
send(data, 0.0, exceptionState);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698