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

Unified Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 1308723003: DOMWindow::navigator should return navigator w/o frame when detached. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « LayoutTests/http/tests/serviceworker/chromium/frame-removed.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 0ffefbc9f3026c909f369bca438422e598acdad5..8ec7bb0635bd1aa049e8a5ecca329d2b6a3ed049 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -662,7 +662,8 @@ ApplicationCache* LocalDOMWindow::applicationCache() const
Navigator* LocalDOMWindow::navigator() const
{
if (!m_navigator)
- m_navigator = Navigator::create(frame());
+ m_navigator = Navigator::create(isCurrentlyDisplayedInFrame() ? frame() : nullptr);
haraken 2015/08/24 06:28:21 Can you add a comment on this?
yhirano 2015/08/24 06:52:35 Done.
+ ASSERT(isCurrentlyDisplayedInFrame() || !m_navigator->frame());
return m_navigator.get();
}
« no previous file with comments | « LayoutTests/http/tests/serviceworker/chromium/frame-removed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698