Chromium Code Reviews| Index: public/platform/WebMemoryAllocatorDump.h |
| diff --git a/public/platform/WebMemoryAllocatorDump.h b/public/platform/WebMemoryAllocatorDump.h |
| index 91136f19852769e96912b0a042f64cb9a48a40ed..c6ce4af8a2500593af0d3e78eb636d56c662f06f 100644 |
| --- a/public/platform/WebMemoryAllocatorDump.h |
| +++ b/public/platform/WebMemoryAllocatorDump.h |
| @@ -9,11 +9,24 @@ |
| #include "WebString.h" |
| namespace blink { |
| +typedef uint64_t WebMemoryAllocatorDumpGuid; |
|
Primiano Tucci (use gerrit)
2015/06/09 20:51:34
using WebMemoryAllocatorDumpGuid = uint64_t?
ssid
2015/06/10 12:36:00
Webkit has a lot of files which use typedef, for e
|
| // A container which holds all the attributes of a particular dump for a given |
| // allocator. |
| class BLINK_PLATFORM_EXPORT WebMemoryAllocatorDump { |
| public: |
| + // TODO(ssid): This constructor should be removed once the usage is |
| + // changed in chromium side (ETA: 15/06/2015). |
| + WebMemoryAllocatorDump() |
| + : m_guid(0) |
| + { |
| + } |
| + |
| + WebMemoryAllocatorDump(WebMemoryAllocatorDumpGuid guid) |
| + : m_guid(guid) |
| + { |
| + } |
| + |
| virtual ~WebMemoryAllocatorDump(); |
| // Adds a scalar attribute to the dump. |
| @@ -27,6 +40,21 @@ public: |
| virtual void AddScalar(const WebString& name, const char* units, uint64_t value) { BLINK_ASSERT_NOT_REACHED(); } |
| virtual void AddScalarF(const WebString& name, const char* units, double value) { BLINK_ASSERT_NOT_REACHED(); } |
| virtual void AddString(const WebString& name, const char* units, const WebString& value) { BLINK_ASSERT_NOT_REACHED(); } |
| + |
| + // |guid| is an optional global dump identifier, unique across all processes |
| + // within the scope of a global dump. It is only required when using the |
| + // graph APIs (see AddOwnershipEdge) to express retention / suballocation or |
| + // cross process sharing. See crbug.com/492102 for design docs. |
| + // Subsequent MemoryAllocatorDump(s) with the same |absolute_name| are |
| + // expected to have the same guid. |
| + const WebMemoryAllocatorDumpGuid& guid() const |
| + { |
| + BLINK_ASSERT(m_guid); |
| + return m_guid; |
| + } |
| + |
| +private: |
| + WebMemoryAllocatorDumpGuid m_guid; |
| }; |
| } // namespace blink |