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

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

Issue 42523003: [oilpan] Don't notify CachedResourceClients of cancel events when detaching the frame. (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | Source/core/loader/cache/CachedResource.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) 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 , m_isComplete(false) 217 , m_isComplete(false)
218 , m_needsClear(false) 218 , m_needsClear(false)
219 , m_checkTimer(this, &FrameLoader::checkTimerFired) 219 , m_checkTimer(this, &FrameLoader::checkTimerFired)
220 , m_shouldCallCheckCompleted(false) 220 , m_shouldCallCheckCompleted(false)
221 , m_shouldCallCheckLoadComplete(false) 221 , m_shouldCallCheckLoadComplete(false)
222 , m_opener(0) 222 , m_opener(0)
223 , m_didAccessInitialDocument(false) 223 , m_didAccessInitialDocument(false)
224 , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocume ntTimerFired) 224 , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocume ntTimerFired)
225 , m_suppressOpenerInNewFrame(false) 225 , m_suppressOpenerInNewFrame(false)
226 , m_forcedSandboxFlags(SandboxNone) 226 , m_forcedSandboxFlags(SandboxNone)
227 , m_frameDetaching(false)
227 { 228 {
228 } 229 }
229 230
230 FrameLoader::~FrameLoader() 231 FrameLoader::~FrameLoader()
231 { 232 {
232 setOpener(0); 233 setOpener(0);
233 234
234 HashSet<Frame*>::iterator end = m_openedFrames.end(); 235 HashSet<Frame*>::iterator end = m_openedFrames.end();
235 for (HashSet<Frame*>::iterator it = m_openedFrames.begin(); it != end; ++it) 236 for (HashSet<Frame*>::iterator it = m_openedFrames.begin(); it != end; ++it)
236 (*it)->loader()->m_opener = 0; 237 (*it)->loader()->m_opener = 0;
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 } 2086 }
2086 2087
2087 void FrameLoader::handledOnloadEvents() 2088 void FrameLoader::handledOnloadEvents()
2088 { 2089 {
2089 m_client->dispatchDidHandleOnloadEvents(); 2090 m_client->dispatchDidHandleOnloadEvents();
2090 2091
2091 if (documentLoader()) 2092 if (documentLoader())
2092 documentLoader()->handledOnloadEvents(); 2093 documentLoader()->handledOnloadEvents();
2093 } 2094 }
2094 2095
2096 bool FrameLoader::isFrameDetaching()
2097 {
2098 return m_frameDetaching;
2099 }
2100
2095 void FrameLoader::frameDetached() 2101 void FrameLoader::frameDetached()
2096 { 2102 {
2103 m_frameDetaching = true;
2097 // stopAllLoaders can detach the Frame, so protect it. 2104 // stopAllLoaders can detach the Frame, so protect it.
2098 RefPtr<Frame> protect(m_frame); 2105 RefPtr<Frame> protect(m_frame);
2099 stopAllLoaders(); 2106 stopAllLoaders();
2100 m_frame->document()->stopActiveDOMObjects(); 2107 m_frame->document()->stopActiveDOMObjects();
2101 detachFromParent(); 2108 detachFromParent();
2102 } 2109 }
2103 2110
2104 void FrameLoader::detachFromParent() 2111 void FrameLoader::detachFromParent()
2105 { 2112 {
2106 // stopAllLoaders can detach the Frame, so protect it. 2113 // stopAllLoaders can detach the Frame, so protect it.
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); 3065 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect);
3059 3066
3060 page->chrome()->setWindowRect(newWindowRect); 3067 page->chrome()->setWindowRect(newWindowRect);
3061 page->chrome()->show(); 3068 page->chrome()->show();
3062 3069
3063 created = true; 3070 created = true;
3064 return frame; 3071 return frame;
3065 } 3072 }
3066 3073
3067 } // namespace WebCore 3074 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.h ('k') | Source/core/loader/cache/CachedResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698