Index: Source/modules/webmidi/MIDIInput.cpp |
diff --git a/Source/modules/webmidi/MIDIInput.cpp b/Source/modules/webmidi/MIDIInput.cpp |
index 748b844e226101199ac26237eabd698e5994fb7c..2b0a83f20fedf0d8f9d5aa83338897a0efa8b20f 100644 |
--- a/Source/modules/webmidi/MIDIInput.cpp |
+++ b/Source/modules/webmidi/MIDIInput.cpp |
@@ -36,17 +36,15 @@ |
namespace WebCore { |
-PassRefPtr<MIDIInput> MIDIInput::create(MIDIAccess* access, ExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version) |
+PassRefPtr<MIDIInput> MIDIInput::create(MIDIAccess* access, const String& id, const String& manufacturer, const String& name, const String& version) |
{ |
ASSERT(access); |
- RefPtr<MIDIInput> input = adoptRef(new MIDIInput(access, context, id, manufacturer, name, version)); |
- input->suspendIfNeeded(); |
+ RefPtr<MIDIInput> input = adoptRef(new MIDIInput(access, id, manufacturer, name, version)); |
return input.release(); |
} |
-MIDIInput::MIDIInput(MIDIAccess* access, ExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version) |
- : MIDIPort(context, id, manufacturer, name, MIDIPortTypeInput, version) |
- , m_access(access) |
+MIDIInput::MIDIInput(MIDIAccess* access, const String& id, const String& manufacturer, const String& name, const String& version) |
+ : MIDIPort(access, id, manufacturer, name, MIDIPortTypeInput, version) |
{ |
ScriptWrappable::init(this); |
} |
@@ -61,7 +59,7 @@ void MIDIInput::didReceiveMIDIData(unsigned portIndex, const unsigned char* data |
// 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 && !m_access->sysExEnabled()) |
+ if (data[0] == 0xf0 && !midiAccess()->sysExEnabled()) |
return; |
RefPtr<Uint8Array> array = Uint8Array::create(data, length); |
dispatchEvent(MIDIMessageEvent::create(timeStamp, array)); |