Index: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp |
diff --git a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp |
index 59ee9c871d7ec8c53443508c2b71d718149d68be..03ff686572f9bc1b8724616c2564ab4694a3ba38 100644 |
--- a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp |
+++ b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp |
@@ -138,11 +138,8 @@ void NavigatorContentUtils::registerProtocolHandler(Navigator& navigator, const |
if (!navigator.frame()) |
return; |
- Document* document = navigator.frame()->document(); |
- if (!document) |
- return; |
- |
- KURL baseURL = document->baseURL(); |
+ ASSERT(navigator.frame()->document()); |
+ KURL baseURL = navigator.frame()->document()->baseURL(); |
if (!verifyCustomHandlerURL(baseURL, url, exceptionState)) |
return; |
@@ -181,6 +178,7 @@ String NavigatorContentUtils::isProtocolHandlerRegistered(Navigator& navigator, |
return declined; |
Document* document = navigator.frame()->document(); |
+ ASSERT(document); |
if (document->activeDOMObjectsAreStopped()) |
return declined; |
@@ -201,8 +199,8 @@ void NavigatorContentUtils::unregisterProtocolHandler(Navigator& navigator, cons |
if (!navigator.frame()) |
return; |
- Document* document = navigator.frame()->document(); |
- KURL baseURL = document->baseURL(); |
+ ASSERT(navigator.frame()->document()); |
+ KURL baseURL = navigator.frame()->document()->baseURL(); |
if (!verifyCustomHandlerURL(baseURL, url, exceptionState)) |
return; |