| Index: third_party/WebKit/public/platform/WebProcessMemoryDump.h
|
| diff --git a/third_party/WebKit/public/platform/WebProcessMemoryDump.h b/third_party/WebKit/public/platform/WebProcessMemoryDump.h
|
| index 432ab947b0d9a0d11303de1f9e7ade675a2b647f..6e71cc009d31c2dfe1b6a98a2e3294c869468802 100644
|
| --- a/third_party/WebKit/public/platform/WebProcessMemoryDump.h
|
| +++ b/third_party/WebKit/public/platform/WebProcessMemoryDump.h
|
| @@ -42,41 +42,23 @@ public:
|
| // |guid| is an optional identifier, unique among all processes within the
|
| // scope of a global dump. This is only relevant when using
|
| // addOwnershipEdge(). If omitted, it will be automatically generated.
|
| - virtual WebMemoryAllocatorDump* createMemoryAllocatorDump(const WebString& absoluteName, WebMemoryAllocatorDumpGuid guid)
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - return nullptr;
|
| - }
|
| -
|
| - virtual WebMemoryAllocatorDump* createMemoryAllocatorDump(const WebString& absoluteName)
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - return nullptr;
|
| - }
|
| + virtual WebMemoryAllocatorDump* createMemoryAllocatorDump(const WebString& absoluteName, WebMemoryAllocatorDumpGuid) = 0;
|
| +
|
| + virtual WebMemoryAllocatorDump* createMemoryAllocatorDump(const WebString& absoluteName) = 0;
|
|
|
| // Gets a previously created MemoryAllocatorDump given its name.
|
| - virtual WebMemoryAllocatorDump* getMemoryAllocatorDump(const WebString& absoluteName) const
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - return nullptr;
|
| - }
|
| + virtual WebMemoryAllocatorDump* getMemoryAllocatorDump(const WebString& absoluteName) const = 0;
|
|
|
| // Removes all the WebMemoryAllocatorDump(s) contained in this instance.
|
| // This WebProcessMemoryDump can be safely reused as if it was new once this
|
| // method returns.
|
| - virtual void clear()
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - }
|
| + virtual void clear() = 0;
|
|
|
| // Merges all WebMemoryAllocatorDump(s) contained in |other| inside this
|
| // WebProcessMemoryDump, transferring their ownership to this instance.
|
| // |other| will be an empty WebProcessMemoryDump after this method returns
|
| // and can be reused as if it was new.
|
| - virtual void takeAllDumpsFrom(WebProcessMemoryDump* other)
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - }
|
| + virtual void takeAllDumpsFrom(WebProcessMemoryDump* other) = 0;
|
|
|
| // Adds an ownership relationship between two MemoryAllocatorDump(s) with
|
| // the semantics: |source| owns |target|, and has the effect of attributing
|
| @@ -84,25 +66,16 @@ public:
|
| // relevant only for the cases of co-ownership, where it acts as a z-index:
|
| // the owner with the highest importance will be attributed |target|'s
|
| // memory.
|
| - virtual void addOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAllocatorDumpGuid target, int importance)
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - }
|
| + virtual void addOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAllocatorDumpGuid target, int importance) = 0;
|
|
|
| - virtual void addOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAllocatorDumpGuid target)
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - }
|
| + virtual void addOwnershipEdge(WebMemoryAllocatorDumpGuid source, WebMemoryAllocatorDumpGuid target) = 0;
|
|
|
| // Utility method to add a suballocation relationship with the following
|
| // semantics: |source| is suballocated from |target_node_name|.
|
| // This creates a child node of |target_node_name| and adds an ownership
|
| // edge between |source| and the new child node. As a result, the UI will
|
| // not account the memory of |source| in the target node.
|
| - virtual void addSuballocation(WebMemoryAllocatorDumpGuid source, const WebString& targetNodeName)
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - }
|
| + virtual void addSuballocation(WebMemoryAllocatorDumpGuid source, const WebString& targetNodeName) = 0;
|
|
|
| // Returns the SkTraceMemoryDump proxy interface that can be passed to Skia
|
| // to dump into this WebProcessMemoryDump. Multiple SkTraceMemoryDump
|
| @@ -111,24 +84,13 @@ public:
|
| // object owning them. |dumpNamePrefix| is prefix appended to each dump
|
| // created by the SkTraceMemoryDump implementation, if the dump should be
|
| // placed under different namespace and not "skia".
|
| - virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNamePrefix)
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - return nullptr;
|
| - }
|
| -
|
| - virtual blink::WebMemoryAllocatorDump* createDiscardableMemoryAllocatorDump(const std::string& name, base::DiscardableMemory* discardable)
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - return nullptr;
|
| - }
|
| + virtual SkTraceMemoryDump* createDumpAdapterForSkia(const WebString& dumpNamePrefix) = 0;
|
| +
|
| + virtual blink::WebMemoryAllocatorDump* createDiscardableMemoryAllocatorDump(const std::string& name, base::DiscardableMemory*) = 0;
|
|
|
| // Dumps heap memory usage. |allocatorName| is used as an absolute name for
|
| // base::trace_event::ProcessMemoryDump::AddHeapDump.
|
| - virtual void dumpHeapUsage(const base::hash_map<base::trace_event::AllocationContext, size_t>& bytesByContext, base::trace_event::TraceEventMemoryOverhead& overhead, const char* allocatorName)
|
| - {
|
| - BLINK_ASSERT_NOT_REACHED();
|
| - }
|
| + virtual void dumpHeapUsage(const base::hash_map<base::trace_event::AllocationContext, size_t>& bytesByContext, base::trace_event::TraceEventMemoryOverhead&, const char* allocatorName) = 0;
|
| };
|
|
|
| } // namespace blink
|
|
|