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

Side by Side Diff: Source/core/inspector/InspectorHeapProfilerAgent.cpp

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 9 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
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/inspector/InspectorOverlay.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void InspectorHeapProfilerAgent::HeapStatsUpdateTask::onTimer(Timer<HeapStatsUpd ateTask>*) 117 void InspectorHeapProfilerAgent::HeapStatsUpdateTask::onTimer(Timer<HeapStatsUpd ateTask>*)
118 { 118 {
119 // The timer is stopped on m_heapProfilerAgent destruction, 119 // The timer is stopped on m_heapProfilerAgent destruction,
120 // so this method will never be called after m_heapProfilerAgent has been de stroyed. 120 // so this method will never be called after m_heapProfilerAgent has been de stroyed.
121 m_heapProfilerAgent->requestHeapStatsUpdate(); 121 m_heapProfilerAgent->requestHeapStatsUpdate();
122 } 122 }
123 123
124 void InspectorHeapProfilerAgent::HeapStatsUpdateTask::startTimer() 124 void InspectorHeapProfilerAgent::HeapStatsUpdateTask::startTimer()
125 { 125 {
126 ASSERT(!m_timer.isActive()); 126 ASSERT(!m_timer.isActive());
127 m_timer.startRepeating(0.05); 127 m_timer.startRepeating(0.05, FROM_HERE);
128 } 128 }
129 129
130 class InspectorHeapProfilerAgent::HeapStatsStream FINAL : public ScriptProfiler: :OutputStream { 130 class InspectorHeapProfilerAgent::HeapStatsStream FINAL : public ScriptProfiler: :OutputStream {
131 public: 131 public:
132 HeapStatsStream(InspectorHeapProfilerAgent* heapProfilerAgent) 132 HeapStatsStream(InspectorHeapProfilerAgent* heapProfilerAgent)
133 : m_heapProfilerAgent(heapProfilerAgent) 133 : m_heapProfilerAgent(heapProfilerAgent)
134 { 134 {
135 } 135 }
136 136
137 virtual void write(const uint32_t* chunk, const int size) OVERRIDE 137 virtual void write(const uint32_t* chunk, const int size) OVERRIDE
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 if (value.hasNoValue() || value.isUndefined()) { 300 if (value.hasNoValue() || value.isUndefined()) {
301 *errorString = "Object with given id not found"; 301 *errorString = "Object with given id not found";
302 return; 302 return;
303 } 303 }
304 unsigned id = ScriptProfiler::getHeapObjectId(value); 304 unsigned id = ScriptProfiler::getHeapObjectId(value);
305 *heapSnapshotObjectId = String::number(id); 305 *heapSnapshotObjectId = String::number(id);
306 } 306 }
307 307
308 } // namespace WebCore 308 } // namespace WebCore
309 309
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/inspector/InspectorOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698