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

Side by Side Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 305743003: HTMLImportsController does not need to hold Document ptr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/html/LinkResource.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 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 { 255 {
256 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL); 256 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL);
257 return m_documentResources.get(url).get(); 257 return m_documentResources.get(url).get();
258 } 258 }
259 259
260 LocalFrame* ResourceFetcher::frame() const 260 LocalFrame* ResourceFetcher::frame() const
261 { 261 {
262 if (m_documentLoader) 262 if (m_documentLoader)
263 return m_documentLoader->frame(); 263 return m_documentLoader->frame();
264 if (m_document && m_document->importsController()) 264 if (m_document && m_document->importsController())
265 return m_document->importsController()->frame(); 265 return m_document->importsController()->master()->frame();
266 return 0; 266 return 0;
267 } 267 }
268 268
269 FetchContext& ResourceFetcher::context() const 269 FetchContext& ResourceFetcher::context() const
270 { 270 {
271 if (LocalFrame* frame = this->frame()) 271 if (LocalFrame* frame = this->frame())
272 return frame->fetchContext(); 272 return frame->fetchContext();
273 return FetchContext::nullInstance(); 273 return FetchContext::nullInstance();
274 } 274 }
275 275
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 } 1463 }
1464 } 1464 }
1465 1465
1466 void ResourceFetcher::trace(Visitor* visitor) 1466 void ResourceFetcher::trace(Visitor* visitor)
1467 { 1467 {
1468 visitor->trace(m_document); 1468 visitor->trace(m_document);
1469 ResourceLoaderHost::trace(visitor); 1469 ResourceLoaderHost::trace(visitor);
1470 } 1470 }
1471 1471
1472 } 1472 }
OLDNEW
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/html/LinkResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698