Chromium Code Reviews

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

Issue 1421113006: Detach the globals of all frames, not just the main frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl try Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 286 matching lines...)
297 m_loader.stopAllLoaders(); 297 m_loader.stopAllLoaders();
298 m_loader.detach(); 298 m_loader.detach();
299 document()->detach(); 299 document()->detach();
300 m_loader.clear(); 300 m_loader.clear();
301 if (!client()) 301 if (!client())
302 return; 302 return;
303 303
304 client()->willBeDetached(); 304 client()->willBeDetached();
305 // Notify ScriptController that the frame is closing, since its cleanup ends up calling 305 // Notify ScriptController that the frame is closing, since its cleanup ends up calling
306 // back to FrameLoaderClient via WindowProxy. 306 // back to FrameLoaderClient via WindowProxy.
307 script().clearForClose(); 307 script().clearWindowProxy();
308 ScriptForbiddenScope forbidScript; 308 ScriptForbiddenScope forbidScript;
309 setView(nullptr); 309 setView(nullptr);
310 willDetachFrameHost(); 310 willDetachFrameHost();
311 InspectorInstrumentation::frameDetachedFromParent(this); 311 InspectorInstrumentation::frameDetachedFromParent(this);
312 Frame::detach(type); 312 Frame::detach(type);
313 313
314 // Signal frame destruction here rather than in the destructor. 314 // Signal frame destruction here rather than in the destructor.
315 // Main motivation is to avoid being dependent on its exact timing (Oilpan.) 315 // Main motivation is to avoid being dependent on its exact timing (Oilpan.)
316 LocalFrameLifecycleNotifier::notifyContextDestroyed(); 316 LocalFrameLifecycleNotifier::notifyContextDestroyed();
317 // TODO(dcheng): Temporary, to debug https://crbug.com/531291. 317 // TODO(dcheng): Temporary, to debug https://crbug.com/531291.
(...skipping 585 matching lines...)
903 if (!context) 903 if (!context)
904 return; 904 return;
905 905
906 WebSecurityOrigin securityOrigin(context->securityOrigin()); 906 WebSecurityOrigin securityOrigin(context->securityOrigin());
907 frameScheduler()->setFrameOrigin(&securityOrigin); 907 frameScheduler()->setFrameOrigin(&securityOrigin);
908 } 908 }
909 909
910 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); 910 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame);
911 911
912 } // namespace blink 912 } // namespace blink
OLDNEW

Powered by Google App Engine