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

Unified Diff: Source/modules/navigatorcontentutils/NavigatorContentUtils.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
Index: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
diff --git a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
index a0ca52fcf60dde5adaeec65d352a0b7e2d28c486..c481505892e9f57e019a65925ed84e7a8206d3e1 100644
--- a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
+++ b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
@@ -181,6 +181,9 @@ String NavigatorContentUtils::isProtocolHandlerRegistered(Navigator& navigator,
return declined;
Document* document = navigator.frame()->document();
+ if (document->activeDOMObjectsAreStopped())
+ return declined;
+
KURL baseURL = document->baseURL();
if (!verifyCustomHandlerURL(baseURL, url, exceptionState))

Powered by Google App Engine
This is Rietveld 408576698