| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 v8::UniqueId id(*idPointer); | 227 v8::UniqueId id(*idPointer); |
| 228 if (!m_liveRootGroupIdSet) { | 228 if (!m_liveRootGroupIdSet) { |
| 229 m_isolate->SetObjectGroupId(liveRoot, id); | 229 m_isolate->SetObjectGroupId(liveRoot, id); |
| 230 m_liveRootGroupIdSet = true; | 230 m_liveRootGroupIdSet = true; |
| 231 ++m_domObjectsWithPendingActivity; | 231 ++m_domObjectsWithPendingActivity; |
| 232 } | 232 } |
| 233 return id; | 233 return id; |
| 234 } | 234 } |
| 235 | 235 |
| 236 v8::Isolate* m_isolate; | 236 v8::Isolate* m_isolate; |
| 237 WillBePersistentHeapVector<RawPtrWillBeMember<Node>> m_groupsWhichNeedRetain
erInfo; | 237 // v8 guarantees that Blink will not regain control while a v8 GC runs |
| 238 // (=> no Oilpan GCs will be triggered), hence raw, untraced members |
| 239 // can safely be kept here. |
| 240 Vector<RawPtrWillBeUntracedMember<Node>> m_groupsWhichNeedRetainerInfo; |
| 238 int m_domObjectsWithPendingActivity; | 241 int m_domObjectsWithPendingActivity; |
| 239 bool m_liveRootGroupIdSet; | 242 bool m_liveRootGroupIdSet; |
| 240 bool m_constructRetainedObjectInfos; | 243 bool m_constructRetainedObjectInfos; |
| 241 }; | 244 }; |
| 242 | 245 |
| 243 static unsigned long long usedHeapSize(v8::Isolate* isolate) | 246 static unsigned long long usedHeapSize(v8::Isolate* isolate) |
| 244 { | 247 { |
| 245 v8::HeapStatistics heapStatistics; | 248 v8::HeapStatistics heapStatistics; |
| 246 isolate->GetHeapStatistics(&heapStatistics); | 249 isolate->GetHeapStatistics(&heapStatistics); |
| 247 return heapStatistics.used_heap_size(); | 250 return heapStatistics.used_heap_size(); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 Visitor* m_visitor; | 448 Visitor* m_visitor; |
| 446 }; | 449 }; |
| 447 | 450 |
| 448 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) | 451 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) |
| 449 { | 452 { |
| 450 DOMWrapperTracer tracer(visitor); | 453 DOMWrapperTracer tracer(visitor); |
| 451 isolate->VisitHandlesWithClassIds(&tracer); | 454 isolate->VisitHandlesWithClassIds(&tracer); |
| 452 } | 455 } |
| 453 | 456 |
| 454 } // namespace blink | 457 } // namespace blink |
| OLD | NEW |