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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2398733004: Do not SendPasswordForms when LocalFrame is being detached (Closed)
Patch Set: Rename to isFrameDetachedForSpecialOneOffStopTheCrashingHackBug561873() Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 loadType, KURL(), clientRedirectPolicy)); 372 loadType, KURL(), clientRedirectPolicy));
373 request.setClientRedirect(clientRedirectPolicy); 373 request.setClientRedirect(clientRedirectPolicy);
374 m_loader.load(request, loadType); 374 m_loader.load(request, loadType);
375 } else { 375 } else {
376 DCHECK_EQ(FrameLoadTypeReload, loadType); 376 DCHECK_EQ(FrameLoadTypeReload, loadType);
377 m_navigationScheduler->scheduleReload(); 377 m_navigationScheduler->scheduleReload();
378 } 378 }
379 } 379 }
380 380
381 void LocalFrame::detach(FrameDetachType type) { 381 void LocalFrame::detach(FrameDetachType type) {
382 m_detached = true;
383
382 PluginScriptForbiddenScope forbidPluginDestructorScripting; 384 PluginScriptForbiddenScope forbidPluginDestructorScripting;
383 m_loader.stopAllLoaders(); 385 m_loader.stopAllLoaders();
384 // Don't allow any new child frames to load in this frame: attaching a new 386 // Don't allow any new child frames to load in this frame: attaching a new
385 // child frame during or after detaching children results in an attached 387 // child frame during or after detaching children results in an attached
386 // frame on a detached DOM tree, which is bad. 388 // frame on a detached DOM tree, which is bad.
387 SubframeLoadingDisabler disabler(*document()); 389 SubframeLoadingDisabler disabler(*document());
388 m_loader.dispatchUnloadEvent(); 390 m_loader.dispatchUnloadEvent();
389 detachChildren(); 391 detachChildren();
390 392
391 // All done if detaching the subframes brought about a detach of this frame 393 // All done if detaching the subframes brought about a detach of this frame
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 900 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
899 m_frame->client()->frameBlameContext()->Enter(); 901 m_frame->client()->frameBlameContext()->Enter();
900 } 902 }
901 903
902 ScopedFrameBlamer::~ScopedFrameBlamer() { 904 ScopedFrameBlamer::~ScopedFrameBlamer() {
903 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 905 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
904 m_frame->client()->frameBlameContext()->Leave(); 906 m_frame->client()->frameBlameContext()->Leave();
905 } 907 }
906 908
907 } // namespace blink 909 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698