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

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

Issue 199633012: Merge 169602 "Add more checks to prevent crashes when accessing ..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1847/
Patch Set: Created 6 years, 9 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/fast/dom/Window/name-and-opener-on-detached-window-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/DOMWindow.cpp
===================================================================
--- Source/core/frame/DOMWindow.cpp (revision 169809)
+++ Source/core/frame/DOMWindow.cpp (working copy)
@@ -1217,7 +1217,7 @@
const AtomicString& DOMWindow::name() const
{
- if (!m_frame)
+ if (!isCurrentlyDisplayedInFrame())
return nullAtom;
return m_frame->tree().name();
@@ -1225,10 +1225,11 @@
void DOMWindow::setName(const AtomicString& name)
{
- if (!m_frame)
+ if (!isCurrentlyDisplayedInFrame())
return;
m_frame->tree().setName(name);
+ ASSERT(m_frame->loader().client());
m_frame->loader().client()->didChangeName(name);
}
« no previous file with comments | « LayoutTests/fast/dom/Window/name-and-opener-on-detached-window-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698