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

Side by Side Diff: third_party/WebKit/WebCore/loader/DocLoader.cpp

Issue 165436: Merge WebKit r44541 to the 172 (2.0) branch.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: Created 11 years, 4 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 | no next file » | 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, 2008 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2008 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 , m_requestCount(0) 54 , m_requestCount(0)
55 , m_autoLoadImages(true) 55 , m_autoLoadImages(true)
56 , m_loadInProgress(false) 56 , m_loadInProgress(false)
57 , m_allowStaleResources(false) 57 , m_allowStaleResources(false)
58 { 58 {
59 m_cache->addDocLoader(this); 59 m_cache->addDocLoader(this);
60 } 60 }
61 61
62 DocLoader::~DocLoader() 62 DocLoader::~DocLoader()
63 { 63 {
64 if (m_requestCount)
65 m_cache->loader()->cancelRequests(this);
66
64 clearPreloads(); 67 clearPreloads();
65 DocumentResourceMap::iterator end = m_documentResources.end(); 68 DocumentResourceMap::iterator end = m_documentResources.end();
66 for (DocumentResourceMap::iterator it = m_documentResources.begin(); it != e nd; ++it) 69 for (DocumentResourceMap::iterator it = m_documentResources.begin(); it != e nd; ++it)
67 it->second->setDocLoader(0); 70 it->second->setDocLoader(0);
68 m_cache->removeDocLoader(this); 71 m_cache->removeDocLoader(this);
69 72
70 // Make sure no requests still point to this DocLoader 73 // Make sure no requests still point to this DocLoader
71 ASSERT(m_requestCount == 0); 74 ASSERT(m_requestCount == 0);
72 } 75 }
73 76
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 if (scripts) 435 if (scripts)
433 printf("SCRIPTS: %d (%d hits, hit rate %d%%)\n", scripts, scripts - scri ptMisses, (scripts - scriptMisses) * 100 / scripts); 436 printf("SCRIPTS: %d (%d hits, hit rate %d%%)\n", scripts, scripts - scri ptMisses, (scripts - scriptMisses) * 100 / scripts);
434 if (stylesheets) 437 if (stylesheets)
435 printf("STYLESHEETS: %d (%d hits, hit rate %d%%)\n", stylesheets, styles heets - stylesheetMisses, (stylesheets - stylesheetMisses) * 100 / stylesheets); 438 printf("STYLESHEETS: %d (%d hits, hit rate %d%%)\n", stylesheets, styles heets - stylesheetMisses, (stylesheets - stylesheetMisses) * 100 / stylesheets);
436 if (images) 439 if (images)
437 printf("IMAGES: %d (%d hits, hit rate %d%%)\n", images, images - imageM isses, (images - imageMisses) * 100 / images); 440 printf("IMAGES: %d (%d hits, hit rate %d%%)\n", images, images - imageM isses, (images - imageMisses) * 100 / images);
438 } 441 }
439 #endif 442 #endif
440 443
441 } 444 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698