Index: Source/bindings/v8/Dictionary.cpp |
diff --git a/Source/bindings/v8/Dictionary.cpp b/Source/bindings/v8/Dictionary.cpp |
index b4cde415c32ba171a1639b1c2f6716dcca3bd696..e42a5687b921d05e3006b909ddd64a449d8a5504 100644 |
--- a/Source/bindings/v8/Dictionary.cpp |
+++ b/Source/bindings/v8/Dictionary.cpp |
@@ -31,6 +31,7 @@ |
#include "V8DOMWindow.h" |
#include "V8EventTarget.h" |
#include "V8IDBKeyRange.h" |
+#include "V8MIDIPort.h" |
#include "V8SpeechRecognitionError.h" |
#include "V8SpeechRecognitionResult.h" |
#include "V8SpeechRecognitionResultList.h" |
@@ -331,6 +332,18 @@ bool Dictionary::get(const String& key, RefPtr<Uint8Array>& value) const |
return true; |
} |
+bool Dictionary::get(const String& key, RefPtr<MIDIPort>& value) const |
+{ |
+ v8::Local<v8::Value> v8Value; |
+ if (!getKey(key, v8Value)) |
+ return false; |
+ |
+ value = 0; |
+ if (V8MIDIPort::HasInstance(v8Value, m_isolate, worldType(m_isolate))) |
+ value = V8MIDIPort::toNative(v8::Handle<v8::Object>::Cast(v8Value)); |
+ return true; |
+} |
+ |
#if ENABLE(ENCRYPTED_MEDIA) |
bool Dictionary::get(const String& key, RefPtr<MediaKeyError>& value) const |
{ |