OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 void setUsedHeapSize(size_t usedHeapSize) { m_usedHeapSize = usedHeapSize; } | 74 void setUsedHeapSize(size_t usedHeapSize) { m_usedHeapSize = usedHeapSize; } |
75 | 75 |
76 private: | 76 private: |
77 double m_startTime; | 77 double m_startTime; |
78 size_t m_usedHeapSize; | 78 size_t m_usedHeapSize; |
79 GCEventListeners m_listeners; | 79 GCEventListeners m_listeners; |
80 }; | 80 }; |
81 | 81 |
82 | 82 |
83 // FIXME(361045): remove ScriptGCEvent once DevTools Timeline migrates to tracin
g. | 83 // FIXME(361045): remove ScriptGCEvent once DevTools Timeline migrates to tracin
g. |
84 class ScriptGCEvent | 84 class ScriptGCEvent { |
85 { | |
86 public: | 85 public: |
87 static void addEventListener(ScriptGCEventListener*); | 86 static void addEventListener(ScriptGCEventListener*); |
88 static void removeEventListener(ScriptGCEventListener*); | 87 static void removeEventListener(ScriptGCEventListener*); |
89 static void getHeapSize(HeapInfo&); | 88 static void getHeapSize(HeapInfo&); |
90 | 89 |
91 private: | 90 private: |
92 static void gcEpilogueCallback(v8::GCType type, v8::GCCallbackFlags flags); | 91 static void gcEpilogueCallback(v8::GCType type, v8::GCCallbackFlags flags); |
93 static void gcPrologueCallback(v8::GCType type, v8::GCCallbackFlags flags); | 92 static void gcPrologueCallback(v8::GCType type, v8::GCCallbackFlags flags); |
94 static size_t getUsedHeapSize(); | 93 static size_t getUsedHeapSize(); |
95 }; | 94 }; |
96 | 95 |
97 | 96 |
98 } // namespace WebCore | 97 } // namespace WebCore |
99 | 98 |
100 #endif // !defined(ScriptGCEvent_h) | 99 #endif // !defined(ScriptGCEvent_h) |
OLD | NEW |