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

Unified Diff: Source/web/WebLeakDetector.cpp

Issue 1328653002: Introduce V8GCController::collectAllGarbage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp ('k') | Source/web/tests/WebUnitTests.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLeakDetector.cpp
diff --git a/Source/web/WebLeakDetector.cpp b/Source/web/WebLeakDetector.cpp
index c473500fd2bb0fc214a4738bf99d2d9c7b27b37d..27b9ddf123875086258eb240b2a83f1badcbdd41 100644
--- a/Source/web/WebLeakDetector.cpp
+++ b/Source/web/WebLeakDetector.cpp
@@ -51,10 +51,6 @@ namespace blink {
namespace {
-// FIXME: Oilpan: It may take multiple GC to collect on-heap objects referenced from off-heap objects.
-// Please see comment in Heap::collectAllGarbage()
-static const int kNumberOfGCsToClaimChains = 5;
-
class WebLeakDetectorImpl final : public WebLeakDetector {
WTF_MAKE_NONCOPYABLE(WebLeakDetectorImpl);
public:
@@ -104,8 +100,7 @@ void WebLeakDetectorImpl::collectGarbageAndGetDOMCounts(WebLocalFrame* frame)
// FIXME: HTML5 Notification should be closed because notification affects the result of number of DOM objects.
- for (int i = 0; i < kNumberOfGCsToClaimChains; ++i)
- V8GCController::collectGarbage(isolate);
+ V8GCController::collectAllGarbageForTesting(isolate);
// Note: Oilpan precise GC is scheduled at the end of the event loop.
// Task queue may contain delayed object destruction tasks.
@@ -122,8 +117,7 @@ void WebLeakDetectorImpl::delayedGCAndReport(Timer<WebLeakDetectorImpl>*)
// The second GC is necessary as Resource GC may have postponed clean-up tasks to next event loop.
// The third GC is necessary for cleaning up Document after worker object died.
- for (int i = 0; i < kNumberOfGCsToClaimChains; ++i)
- V8GCController::collectGarbage(V8PerIsolateData::mainThreadIsolate());
+ V8GCController::collectAllGarbageForTesting(V8PerIsolateData::mainThreadIsolate());
// Note: Oilpan precise GC is scheduled at the end of the event loop.
// Inspect counters on the next event loop.
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp ('k') | Source/web/tests/WebUnitTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698