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

Unified Diff: third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h

Issue 1977783002: BlinkGCMemoryDumpProvider should inherit from MemoryDumpProvider directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h
diff --git a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h
index e6de7a3300d3e409e2886db889f598b90eb53f2a..b829c597a474a8f91dc8214e44f730c8d5efecd2 100644
--- a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h
+++ b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.h
@@ -5,11 +5,11 @@
#ifndef BlinkGCMemoryDumpProvider_h
#define BlinkGCMemoryDumpProvider_h
+#include "base/trace_event/memory_dump_provider.h"
#include "platform/PlatformExport.h"
#include "platform/heap/BlinkGC.h"
#include "public/platform/WebMemoryDumpProvider.h"
#include "wtf/Allocator.h"
-#include "wtf/OwnPtr.h"
#include "wtf/ThreadingPrimitives.h"
#include "wtf/text/WTFString.h"
@@ -17,6 +17,7 @@ namespace base {
namespace trace_event {
class AllocationRegister;
+class MemoryAllocatorDump;
} // namespace trace_event
} // namespace base
@@ -24,27 +25,26 @@ class AllocationRegister;
namespace blink {
class WebMemoryAllocatorDump;
-class PLATFORM_EXPORT BlinkGCMemoryDumpProvider final : public WebMemoryDumpProvider {
+class PLATFORM_EXPORT BlinkGCMemoryDumpProvider final : public base::trace_event::MemoryDumpProvider {
USING_FAST_MALLOC(BlinkGCMemoryDumpProvider);
public:
static BlinkGCMemoryDumpProvider* instance();
~BlinkGCMemoryDumpProvider() override;
- // WebMemoryDumpProvider implementation.
- bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) override;
- bool supportsHeapProfiling() override { return true; }
- void onHeapProfilingEnabled(bool) override;
+ // MemoryDumpProvider implementation.
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs&, base::trace_event::ProcessMemoryDump*) override;
+ void OnHeapProfilingEnabled(bool) override;
// The returned WebMemoryAllocatorDump is owned by
// BlinkGCMemoryDumpProvider, and should not be retained (just used to
// dump in the current call stack).
- WebMemoryAllocatorDump* createMemoryAllocatorDumpForCurrentGC(const String& absoluteName);
+ base::trace_event::MemoryAllocatorDump* createMemoryAllocatorDumpForCurrentGC(const String& absoluteName);
// This must be called before taking a new process-wide GC snapshot, to
// clear the previous dumps.
void clearProcessDumpForCurrentGC();
- WebProcessMemoryDump* currentProcessMemoryDump() { return m_currentProcessMemoryDump.get(); }
+ base::trace_event::ProcessMemoryDump* currentProcessMemoryDump() { return m_currentProcessMemoryDump.get(); }
void insert(Address, size_t, const char*);
void remove(Address);
@@ -53,8 +53,8 @@ private:
BlinkGCMemoryDumpProvider();
Mutex m_allocationRegisterMutex;
- OwnPtr<base::trace_event::AllocationRegister> m_allocationRegister;
- OwnPtr<WebProcessMemoryDump> m_currentProcessMemoryDump;
+ std::unique_ptr<base::trace_event::AllocationRegister> m_allocationRegister;
+ std::unique_ptr<base::trace_event::ProcessMemoryDump> m_currentProcessMemoryDump;
bool m_isHeapProfilingEnabled;
};

Powered by Google App Engine
This is Rietveld 408576698