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

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

Issue 1850413002: Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address compilation failure Created 4 years, 8 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 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return tree().parent()->isRemoteFrame(); 147 return tree().parent()->isRemoteFrame();
148 } 148 }
149 149
150 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const 150 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const
151 { 151 {
152 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : nu llptr; 152 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : nu llptr;
153 } 153 }
154 154
155 static ChromeClient& emptyChromeClient() 155 static ChromeClient& emptyChromeClient()
156 { 156 {
157 DEFINE_STATIC_LOCAL(Persistent<EmptyChromeClient>, client, (EmptyChromeClien t::create())); 157 DEFINE_STATIC_LOCAL(EmptyChromeClient, client, (EmptyChromeClient::create()) );
158 return *client; 158 return client;
159 } 159 }
160 160
161 ChromeClient& Frame::chromeClient() const 161 ChromeClient& Frame::chromeClient() const
162 { 162 {
163 if (Page* page = this->page()) 163 if (Page* page = this->page())
164 return page->chromeClient(); 164 return page->chromeClient();
165 return emptyChromeClient(); 165 return emptyChromeClient();
166 } 166 }
167 167
168 Frame* Frame::findFrameForNavigation(const AtomicString& name, Frame& activeFram e) 168 Frame* Frame::findFrameForNavigation(const AtomicString& name, Frame& activeFram e)
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 frameCounter().increment(); 308 frameCounter().increment();
309 #endif 309 #endif
310 310
311 if (m_owner) 311 if (m_owner)
312 m_owner->setContentFrame(*this); 312 m_owner->setContentFrame(*this);
313 else 313 else
314 page()->setMainFrame(this); 314 page()->setMainFrame(this);
315 } 315 }
316 316
317 } // namespace blink 317 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.cpp ('k') | third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698