| OLD | NEW |
| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void InspectorHeapProfilerAgent::HeapStatsUpdateTask::onTimer(Timer<HeapStatsUpd
ateTask>*) | 113 void InspectorHeapProfilerAgent::HeapStatsUpdateTask::onTimer(Timer<HeapStatsUpd
ateTask>*) |
| 114 { | 114 { |
| 115 // The timer is stopped on m_heapProfilerAgent destruction, | 115 // The timer is stopped on m_heapProfilerAgent destruction, |
| 116 // so this method will never be called after m_heapProfilerAgent has been de
stroyed. | 116 // so this method will never be called after m_heapProfilerAgent has been de
stroyed. |
| 117 m_heapProfilerAgent->requestHeapStatsUpdate(); | 117 m_heapProfilerAgent->requestHeapStatsUpdate(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void InspectorHeapProfilerAgent::HeapStatsUpdateTask::startTimer() | 120 void InspectorHeapProfilerAgent::HeapStatsUpdateTask::startTimer() |
| 121 { | 121 { |
| 122 ASSERT(!m_timer.isActive()); | 122 ASSERT(!m_timer.isActive()); |
| 123 m_timer.startRepeating(0.05); | 123 m_timer.startRepeating(0.05, FROM_HERE); |
| 124 } | 124 } |
| 125 | 125 |
| 126 class InspectorHeapProfilerAgent::HeapStatsStream FINAL : public ScriptProfiler:
:OutputStream { | 126 class InspectorHeapProfilerAgent::HeapStatsStream FINAL : public ScriptProfiler:
:OutputStream { |
| 127 public: | 127 public: |
| 128 HeapStatsStream(InspectorHeapProfilerAgent* heapProfilerAgent) | 128 HeapStatsStream(InspectorHeapProfilerAgent* heapProfilerAgent) |
| 129 : m_heapProfilerAgent(heapProfilerAgent) | 129 : m_heapProfilerAgent(heapProfilerAgent) |
| 130 { | 130 { |
| 131 } | 131 } |
| 132 | 132 |
| 133 virtual void write(const uint32_t* chunk, const int size) OVERRIDE | 133 virtual void write(const uint32_t* chunk, const int size) OVERRIDE |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 if (value.hasNoValue() || value.isUndefined()) { | 286 if (value.hasNoValue() || value.isUndefined()) { |
| 287 *errorString = "Object with given id not found"; | 287 *errorString = "Object with given id not found"; |
| 288 return; | 288 return; |
| 289 } | 289 } |
| 290 unsigned id = ScriptProfiler::getHeapObjectId(value); | 290 unsigned id = ScriptProfiler::getHeapObjectId(value); |
| 291 *heapSnapshotObjectId = String::number(id); | 291 *heapSnapshotObjectId = String::number(id); |
| 292 } | 292 } |
| 293 | 293 |
| 294 } // namespace WebCore | 294 } // namespace WebCore |
| 295 | 295 |
| OLD | NEW |