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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1969723004: Add a counter and a deprecation message when navigating in an unload handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding line number to test expectation Created 4 years, 7 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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 m_currentItem->setVisualViewportScrollPoint(m_frame->host()->visualViewport( ).visibleRect().location()); 251 m_currentItem->setVisualViewportScrollPoint(m_frame->host()->visualViewport( ).visibleRect().location());
252 252
253 if (m_frame->isMainFrame()) 253 if (m_frame->isMainFrame())
254 m_currentItem->setPageScaleFactor(m_frame->page()->pageScaleFactor()); 254 m_currentItem->setPageScaleFactor(m_frame->page()->pageScaleFactor());
255 255
256 client()->didUpdateCurrentHistoryItem(); 256 client()->didUpdateCurrentHistoryItem();
257 } 257 }
258 258
259 void FrameLoader::dispatchUnloadEvent() 259 void FrameLoader::dispatchUnloadEvent()
260 { 260 {
261 NavigationCounterForUnload counter;
262
261 // If the frame is unloading, the provisional loader should no longer be 263 // If the frame is unloading, the provisional loader should no longer be
262 // protected. It will be detached soon. 264 // protected. It will be detached soon.
263 m_protectProvisionalLoader = false; 265 m_protectProvisionalLoader = false;
264 saveScrollState(); 266 saveScrollState();
265 267
266 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document())) 268 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document()))
267 m_frame->document()->dispatchUnloadEvents(); 269 m_frame->document()->dispatchUnloadEvents();
268 270
269 if (Page* page = m_frame->page()) 271 if (Page* page = m_frame->page())
270 page->undoStack().didUnloadFrame(*m_frame); 272 page->undoStack().didUnloadFrame(*m_frame);
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1625 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1624 return tracedValue; 1626 return tracedValue;
1625 } 1627 }
1626 1628
1627 inline void FrameLoader::takeObjectSnapshot() const 1629 inline void FrameLoader::takeObjectSnapshot() const
1628 { 1630 {
1629 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1631 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1630 } 1632 }
1631 1633
1632 } // namespace blink 1634 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/core/loader/NavigationScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698