OLD | NEW |
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "FrameLoaderClient.h" | 46 #include "FrameLoaderClient.h" |
47 #include "HTMLElement.h" | 47 #include "HTMLElement.h" |
48 #include "HTMLFrameOwnerElement.h" | 48 #include "HTMLFrameOwnerElement.h" |
49 #include "Logging.h" | 49 #include "Logging.h" |
50 #include "MemoryCache.h" | 50 #include "MemoryCache.h" |
51 #include "Performance.h" | 51 #include "Performance.h" |
52 #include "PingLoader.h" | 52 #include "PingLoader.h" |
53 #include "ScriptController.h" | 53 #include "ScriptController.h" |
54 #include "SecurityOrigin.h" | 54 #include "SecurityOrigin.h" |
55 #include "Settings.h" | 55 #include "Settings.h" |
56 #include <wtf/MemoryInstrumentationHashMap.h> | |
57 #include <wtf/MemoryInstrumentationHashSet.h> | |
58 #include <wtf/MemoryInstrumentationListHashSet.h> | |
59 #include <wtf/UnusedParam.h> | 56 #include <wtf/UnusedParam.h> |
60 #include <wtf/text/CString.h> | 57 #include <wtf/text/CString.h> |
61 #include <wtf/text/WTFString.h> | 58 #include <wtf/text/WTFString.h> |
62 | 59 |
63 #include "CachedTextTrack.h" | 60 #include "CachedTextTrack.h" |
64 | 61 |
65 #define PRELOAD_DEBUG 0 | 62 #define PRELOAD_DEBUG 0 |
66 | 63 |
67 namespace WebCore { | 64 namespace WebCore { |
68 | 65 |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 | 903 |
907 if (scripts) | 904 if (scripts) |
908 printf("SCRIPTS: %d (%d hits, hit rate %d%%)\n", scripts, scripts - scri
ptMisses, (scripts - scriptMisses) * 100 / scripts); | 905 printf("SCRIPTS: %d (%d hits, hit rate %d%%)\n", scripts, scripts - scri
ptMisses, (scripts - scriptMisses) * 100 / scripts); |
909 if (stylesheets) | 906 if (stylesheets) |
910 printf("STYLESHEETS: %d (%d hits, hit rate %d%%)\n", stylesheets, styles
heets - stylesheetMisses, (stylesheets - stylesheetMisses) * 100 / stylesheets); | 907 printf("STYLESHEETS: %d (%d hits, hit rate %d%%)\n", stylesheets, styles
heets - stylesheetMisses, (stylesheets - stylesheetMisses) * 100 / stylesheets); |
911 if (images) | 908 if (images) |
912 printf("IMAGES: %d (%d hits, hit rate %d%%)\n", images, images - imageM
isses, (images - imageMisses) * 100 / images); | 909 printf("IMAGES: %d (%d hits, hit rate %d%%)\n", images, images - imageM
isses, (images - imageMisses) * 100 / images); |
913 } | 910 } |
914 #endif | 911 #endif |
915 | 912 |
916 void CachedResourceLoader::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo)
const | |
917 { | |
918 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Loader); | |
919 info.addMember(m_documentResources, "documentResources"); | |
920 info.addMember(m_document, "document"); | |
921 info.addMember(m_documentLoader, "documentLoader"); | |
922 info.addMember(m_validatedURLs, "validatedURLs"); | |
923 info.addMember(m_preloads, "preloads"); | |
924 info.addMember(m_pendingPreloads, "pendingPreloads"); | |
925 info.addMember(m_garbageCollectDocumentResourcesTimer, "garbageCollectDocume
ntResourcesTimer"); | |
926 // FIXME: m_initiatorMap has pointers to already deleted CachedResources | |
927 info.ignoreMember(m_initiatorMap); | |
928 } | |
929 | |
930 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) | 913 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions(
) |
931 { | 914 { |
932 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); | 915 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData
, AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); |
933 return options; | 916 return options; |
934 } | 917 } |
935 | 918 |
936 } | 919 } |
OLD | NEW |