| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 v8::HeapProfiler* profiler = m_isolate->GetHeapProfiler(); | 220 v8::HeapProfiler* profiler = m_isolate->GetHeapProfiler(); |
| 221 for (size_t i = 0; i < m_groupsWhichNeedRetainerInfo.size(); ++i) { | 221 for (size_t i = 0; i < m_groupsWhichNeedRetainerInfo.size(); ++i) { |
| 222 Node* root = m_groupsWhichNeedRetainerInfo[i]; | 222 Node* root = m_groupsWhichNeedRetainerInfo[i]; |
| 223 if (root != alreadyAdded) { | 223 if (root != alreadyAdded) { |
| 224 profiler->SetRetainedObjectInfo( | 224 profiler->SetRetainedObjectInfo( |
| 225 v8::UniqueId(reinterpret_cast<intptr_t>(root)), | 225 v8::UniqueId(reinterpret_cast<intptr_t>(root)), |
| 226 new RetainedDOMInfo(root)); | 226 new RetainedDOMInfo(root)); |
| 227 alreadyAdded = root; | 227 alreadyAdded = root; |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 if (m_liveRootGroupIdSet) | 230 if (m_liveRootGroupIdSet) { |
| 231 profiler->SetRetainedObjectInfo( | 231 profiler->SetRetainedObjectInfo( |
| 232 liveRootId(), | 232 liveRootId(), |
| 233 new ActiveDOMObjectsInfo(m_domObjectsWithPendingActivity)); | 233 new SuspendableObjectsInfo(m_domObjectsWithPendingActivity)); |
| 234 } |
| 234 } | 235 } |
| 235 | 236 |
| 236 private: | 237 private: |
| 237 v8::UniqueId liveRootId() { | 238 v8::UniqueId liveRootId() { |
| 238 const v8::Persistent<v8::Value>& liveRoot = | 239 const v8::Persistent<v8::Value>& liveRoot = |
| 239 V8PerIsolateData::from(m_isolate)->ensureLiveRoot(); | 240 V8PerIsolateData::from(m_isolate)->ensureLiveRoot(); |
| 240 const intptr_t* idPointer = reinterpret_cast<const intptr_t*>(&liveRoot); | 241 const intptr_t* idPointer = reinterpret_cast<const intptr_t*>(&liveRoot); |
| 241 v8::UniqueId id(*idPointer); | 242 v8::UniqueId id(*idPointer); |
| 242 if (!m_liveRootGroupIdSet) { | 243 if (!m_liveRootGroupIdSet) { |
| 243 m_isolate->SetObjectGroupId(liveRoot, id); | 244 m_isolate->SetObjectGroupId(liveRoot, id); |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 double startTime = WTF::currentTimeMS(); | 544 double startTime = WTF::currentTimeMS(); |
| 544 v8::HandleScope scope(isolate); | 545 v8::HandleScope scope(isolate); |
| 545 PendingActivityVisitor visitor(isolate, executionContext); | 546 PendingActivityVisitor visitor(isolate, executionContext); |
| 546 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor); | 547 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor); |
| 547 scanPendingActivityHistogram.count( | 548 scanPendingActivityHistogram.count( |
| 548 static_cast<int>(WTF::currentTimeMS() - startTime)); | 549 static_cast<int>(WTF::currentTimeMS() - startTime)); |
| 549 return visitor.pendingActivityFound(); | 550 return visitor.pendingActivityFound(); |
| 550 } | 551 } |
| 551 | 552 |
| 552 } // namespace blink | 553 } // namespace blink |
| OLD | NEW |