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

Unified Diff: Source/modules/webmidi/MIDIInput.cpp

Issue 208243014: Add sysexEnabled readonly attribute to MIDIAccess (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: kouhei review Created 6 years, 9 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
« no previous file with comments | « Source/modules/webmidi/MIDIController.cpp ('k') | Source/modules/webmidi/MIDIOutput.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIInput.cpp
diff --git a/Source/modules/webmidi/MIDIInput.cpp b/Source/modules/webmidi/MIDIInput.cpp
index efd14fdca91b61ffb1f725e07c7ec9fafa960fda..42054e87fc06136a2519497db9d46959bbe9eece 100644
--- a/Source/modules/webmidi/MIDIInput.cpp
+++ b/Source/modules/webmidi/MIDIInput.cpp
@@ -57,10 +57,10 @@ void MIDIInput::didReceiveMIDIData(unsigned portIndex, const unsigned char* data
if (!length)
return;
- // Drop SysEx message here when the client does not request it. Note that this is not a security check but an
- // automatic filtering for clients that do not want SysEx message. Also note that SysEx message will never be sent
- // unless the current process has an explicit permission to handle SysEx message.
- if (data[0] == 0xf0 && !midiAccess()->sysExEnabled())
+ // Drop sysex message here when the client does not request it. Note that this is not a security check but an
+ // automatic filtering for clients that do not want sysex message. Also note that sysex message will never be sent
+ // unless the current process has an explicit permission to handle sysex message.
+ if (data[0] == 0xf0 && !midiAccess()->sysexEnabled())
return;
RefPtr<Uint8Array> array = Uint8Array::create(data, length);
dispatchEvent(MIDIMessageEvent::create(timeStamp, array));
« no previous file with comments | « Source/modules/webmidi/MIDIController.cpp ('k') | Source/modules/webmidi/MIDIOutput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698