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

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

Issue 234583004: Fix a crash caused by calling detached navigator APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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/navigatorcontentutils/NavigatorContentUtils.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698