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

Side by Side Diff: Source/core/timing/ConsoleMemory.h

Issue 1230203003: Don't cache MemoryInfo instance on ConsoleMemory object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update corresponding console.memory layout test Created 5 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ConsoleMemory_h 5 #ifndef ConsoleMemory_h
6 #define ConsoleMemory_h 6 #define ConsoleMemory_h
7 7
8 #include "platform/Supplementable.h" 8 #include "platform/Supplementable.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class Console; 12 class Console;
13 class MemoryInfo; 13 class MemoryInfo;
14 14
15 class ConsoleMemory final : public GarbageCollected<ConsoleMemory>, public HeapS upplement<Console> { 15 class ConsoleMemory final : public GarbageCollected<ConsoleMemory>, public HeapS upplement<Console> {
16 USING_GARBAGE_COLLECTED_MIXIN(ConsoleMemory); 16 USING_GARBAGE_COLLECTED_MIXIN(ConsoleMemory);
17 public: 17 public:
18 static ConsoleMemory& from(Console&); 18 static ConsoleMemory& from(Console&);
19 static MemoryInfo* memory(Console&); 19 static MemoryInfo* memory(Console&);
20 static void setMemory(Console&, MemoryInfo*) { } 20 static void setMemory(Console&, MemoryInfo*) { }
21 21
22 DECLARE_VIRTUAL_TRACE(); 22 DEFINE_INLINE_VIRTUAL_TRACE() { HeapSupplement<Console>::trace(visitor); }
23 23
24 private: 24 private:
25 static const char* supplementName() { return "ConsoleMemory"; } 25 static const char* supplementName() { return "ConsoleMemory"; }
26 MemoryInfo* memory(); 26 MemoryInfo* memory();
27
28 Member<MemoryInfo> m_memory;
29 }; 27 };
30 28
31 } // namespace blink 29 } // namespace blink
32 30
33 #endif // ConsoleMemory_h 31 #endif // ConsoleMemory_h
OLDNEW
« no previous file with comments | « LayoutTests/inspector/console/console-memory-equals-console-memory-expected.txt ('k') | Source/core/timing/ConsoleMemory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698