| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "WebCoreMemoryInstrumentation.h" | 34 #include "WebCoreMemoryInstrumentation.h" |
| 35 #include <wtf/MemoryInstrumentationHashMap.h> | 35 #include <wtf/MemoryInstrumentationHashMap.h> |
| 36 #include <wtf/MemoryInstrumentationHashSet.h> | 36 #include <wtf/MemoryInstrumentationHashSet.h> |
| 37 #include <wtf/MemoryInstrumentationVector.h> | 37 #include <wtf/MemoryInstrumentationVector.h> |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 struct SameSizeAsNodeRareData { | 41 struct SameSizeAsNodeRareData { |
| 42 unsigned m_bitfields : 20; | 42 unsigned m_bitfields : 20; |
| 43 void* m_pointer[3]; | 43 void* m_pointer[3]; |
| 44 #if ENABLE(MICRODATA) | |
| 45 void* m_microData; | |
| 46 #endif | |
| 47 }; | 44 }; |
| 48 | 45 |
| 49 COMPILE_ASSERT(sizeof(NodeRareData) == sizeof(SameSizeAsNodeRareData), NodeRareD
ataShouldStaySmall); | 46 COMPILE_ASSERT(sizeof(NodeRareData) == sizeof(SameSizeAsNodeRareData), NodeRareD
ataShouldStaySmall); |
| 50 | 47 |
| 51 void NodeListsNodeData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) co
nst | 48 void NodeListsNodeData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) co
nst |
| 52 { | 49 { |
| 53 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | 50 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); |
| 54 info.addMember(m_childNodeList, "childNodeList"); | 51 info.addMember(m_childNodeList, "childNodeList"); |
| 55 info.addMember(m_atomicNameCaches, "atomicNameCaches"); | 52 info.addMember(m_atomicNameCaches, "atomicNameCaches"); |
| 56 info.addMember(m_nameCaches, "nameCaches"); | 53 info.addMember(m_nameCaches, "nameCaches"); |
| 57 info.addMember(m_tagNodeListCacheNS, "tagNodeListCacheNS"); | 54 info.addMember(m_tagNodeListCacheNS, "tagNodeListCacheNS"); |
| 58 } | 55 } |
| 59 | 56 |
| 60 void NodeRareData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 57 void NodeRareData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
| 61 { | 58 { |
| 62 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | 59 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); |
| 63 info.addMember(m_nodeLists, "nodeLists"); | 60 info.addMember(m_nodeLists, "nodeLists"); |
| 64 info.addMember(m_mutationObserverData, "mutationObserverData"); | 61 info.addMember(m_mutationObserverData, "mutationObserverData"); |
| 65 | |
| 66 #if ENABLE(MICRODATA) | |
| 67 info.addMember(m_microDataTokenLists, "microDataTokenLists"); | |
| 68 #endif | |
| 69 } | 62 } |
| 70 | 63 |
| 71 } // namespace WebCore | 64 } // namespace WebCore |
| OLD | NEW |