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

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

Issue 594483002: Oilpan: extend tracing over WebFrame trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve weak callback registration Created 6 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
« no previous file with comments | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 ASSERT(fabs(originalSize.height()) > std::numeric_limits<float>::epsilon ()); 267 ASSERT(fabs(originalSize.height()) > std::numeric_limits<float>::epsilon ());
268 float ratio = originalSize.width() / originalSize.height(); 268 float ratio = originalSize.width() / originalSize.height();
269 resultSize.setHeight(floorf(expectedSize.height())); 269 resultSize.setHeight(floorf(expectedSize.height()));
270 resultSize.setWidth(floorf(resultSize.height() * ratio)); 270 resultSize.setWidth(floorf(resultSize.height() * ratio));
271 } 271 }
272 return resultSize; 272 return resultSize;
273 } 273 }
274 274
275 void LocalFrame::setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow> domWindow) 275 void LocalFrame::setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow> domWindow)
276 { 276 {
277 // Oilpan: setDOMWindow() cannot be used when finalizing. Which
278 // is acceptable as its actions are either not needed or handled
279 // by other means --
280 //
281 // - FrameDestructionObserver::willDetachFrameHost() will have
282 // signalled the Inspector frameWindowDiscarded() notifications.
283 // We assume that all LocalFrames are detached, where that notification
284 // will have been done.
285 //
286 // - Calling LocalDOMWindow::reset() is not needed (called from
287 // Frame::setDOMWindow().) The Member references it clears will now
288 // die with the window. And the registered DOMWindowProperty instances th at don't,
289 // only keep a weak reference to this frame, so there's no need to be
290 // explicitly notified that this frame is going away.
277 if (m_domWindow) { 291 if (m_domWindow) {
278 // Oilpan: the assumption is that FrameDestructionObserver::willDetachFr ameHost()
279 // on LocalWindow will have signalled these frameWindowDiscarded() notif ications.
280 //
281 // It is not invoked when finalizing the LocalFrame, as setDOMWindow() i sn't
282 // performed (accessing the m_domWindow heap object is unsafe then.)
283 console().messageStorage()->frameWindowDiscarded(m_domWindow.get()); 292 console().messageStorage()->frameWindowDiscarded(m_domWindow.get());
284 InspectorInstrumentation::frameWindowDiscarded(this, m_domWindow.get()); 293 InspectorInstrumentation::frameWindowDiscarded(this, m_domWindow.get());
285 } 294 }
286 if (domWindow) 295 if (domWindow)
287 script().clearWindowProxy(); 296 script().clearWindowProxy();
288 Frame::setDOMWindow(domWindow); 297 Frame::setDOMWindow(domWindow);
289 } 298 }
290 299
291 void LocalFrame::didChangeVisibilityState() 300 void LocalFrame::didChangeVisibilityState()
292 { 301 {
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 740
732 return curFrame; 741 return curFrame;
733 } 742 }
734 743
735 void LocalFrame::setPagePopupOwner(Element& owner) 744 void LocalFrame::setPagePopupOwner(Element& owner)
736 { 745 {
737 m_pagePopupOwner = &owner; 746 m_pagePopupOwner = &owner;
738 } 747 }
739 748
740 } // namespace blink 749 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698