Index: Source/modules/webmidi/NavigatorWebMIDI.cpp |
diff --git a/Source/modules/webmidi/NavigatorWebMIDI.cpp b/Source/modules/webmidi/NavigatorWebMIDI.cpp |
index 278986bea50a555b2da94945df82376a028aea27..12aece2598e3168e590fa483fac58ce3c0983955 100644 |
--- a/Source/modules/webmidi/NavigatorWebMIDI.cpp |
+++ b/Source/modules/webmidi/NavigatorWebMIDI.cpp |
@@ -73,7 +73,7 @@ ScriptPromise NavigatorWebMIDI::requestMIDIAccess(Navigator& navigator, const Di |
ScriptPromise NavigatorWebMIDI::requestMIDIAccess(const Dictionary& options) |
{ |
- if (!frame()) { |
+ if (!frame() || frame()->document()->activeDOMObjectsAreStopped()) { |
RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(v8::Isolate::GetCurrent()); |
ScriptPromise promise = resolver->promise(); |
// FIXME: Currently this rejection does not work because the context is stopped. |