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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp

Issue 1853743005: Oilpan: Remove WillBe types (part 13) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 m_liveRootGroupIdSet = true; 222 m_liveRootGroupIdSet = true;
223 ++m_domObjectsWithPendingActivity; 223 ++m_domObjectsWithPendingActivity;
224 } 224 }
225 return id; 225 return id;
226 } 226 }
227 227
228 v8::Isolate* m_isolate; 228 v8::Isolate* m_isolate;
229 // v8 guarantees that Blink will not regain control while a v8 GC runs 229 // v8 guarantees that Blink will not regain control while a v8 GC runs
230 // (=> no Oilpan GCs will be triggered), hence raw, untraced members 230 // (=> no Oilpan GCs will be triggered), hence raw, untraced members
231 // can safely be kept here. 231 // can safely be kept here.
232 Vector<RawPtrWillBeUntracedMember<Node>> m_groupsWhichNeedRetainerInfo; 232 Vector<UntracedMember<Node>> m_groupsWhichNeedRetainerInfo;
233 int m_domObjectsWithPendingActivity; 233 int m_domObjectsWithPendingActivity;
234 bool m_liveRootGroupIdSet; 234 bool m_liveRootGroupIdSet;
235 bool m_constructRetainedObjectInfos; 235 bool m_constructRetainedObjectInfos;
236 }; 236 };
237 237
238 static unsigned long long usedHeapSize(v8::Isolate* isolate) 238 static unsigned long long usedHeapSize(v8::Isolate* isolate)
239 { 239 {
240 v8::HeapStatistics heapStatistics; 240 v8::HeapStatistics heapStatistics;
241 isolate->GetHeapStatistics(&heapStatistics); 241 isolate->GetHeapStatistics(&heapStatistics);
242 return heapStatistics.used_heap_size(); 242 return heapStatistics.used_heap_size();
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 // 479 //
480 /* && toExecutionContext(wrapper->creationContext()) == m_executionC ontext */ 480 /* && toExecutionContext(wrapper->creationContext()) == m_executionC ontext */
481 ) 481 )
482 m_pendingActivityFound = true; 482 m_pendingActivityFound = true;
483 } 483 }
484 484
485 bool pendingActivityFound() const { return m_pendingActivityFound; } 485 bool pendingActivityFound() const { return m_pendingActivityFound; }
486 486
487 private: 487 private:
488 v8::Isolate* m_isolate; 488 v8::Isolate* m_isolate;
489 RawPtrWillBePersistent<ExecutionContext> m_executionContext; 489 Persistent<ExecutionContext> m_executionContext;
490 bool m_pendingActivityFound; 490 bool m_pendingActivityFound;
491 }; 491 };
492 492
493 bool V8GCController::hasPendingActivity(v8::Isolate* isolate, ExecutionContext* executionContext) 493 bool V8GCController::hasPendingActivity(v8::Isolate* isolate, ExecutionContext* executionContext)
494 { 494 {
495 // V8GCController::hasPendingActivity is used only when a worker checks if 495 // V8GCController::hasPendingActivity is used only when a worker checks if
496 // the worker contains any wrapper that has pending activities. 496 // the worker contains any wrapper that has pending activities.
497 ASSERT(!isMainThread()); 497 ASSERT(!isMainThread());
498 498
499 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, scanPendingActivityHis togram, new CustomCountHistogram("Blink.ScanPendingActivityDuration", 1, 1000, 5 0)); 499 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, scanPendingActivityHis togram, new CustomCountHistogram("Blink.ScanPendingActivityDuration", 1, 1000, 5 0));
500 double startTime = WTF::currentTimeMS(); 500 double startTime = WTF::currentTimeMS();
501 v8::HandleScope scope(isolate); 501 v8::HandleScope scope(isolate);
502 PendingActivityVisitor visitor(isolate, executionContext); 502 PendingActivityVisitor visitor(isolate, executionContext);
503 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor); 503 toIsolate(executionContext)->VisitHandlesWithClassIds(&visitor);
504 scanPendingActivityHistogram.count(static_cast<int>(WTF::currentTimeMS() - s tartTime)); 504 scanPendingActivityHistogram.count(static_cast<int>(WTF::currentTimeMS() - s tartTime));
505 return visitor.pendingActivityFound(); 505 return visitor.pendingActivityFound();
506 } 506 }
507 507
508 } // namespace blink 508 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698