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

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

Powered by Google App Engine
This is Rietveld 408576698