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

Unified Diff: sky/engine/bindings/core/v8/V8GCController.cpp

Issue 678003003: Begin to remove heap/* (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/bindings/core/v8/V8Binding.h ('k') | sky/engine/core/Init.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/core/v8/V8GCController.cpp
diff --git a/sky/engine/bindings/core/v8/V8GCController.cpp b/sky/engine/bindings/core/v8/V8GCController.cpp
index b800dcaeaf37a205b53c8a5fe6ef446cd93781b2..30dbbbc29b12ecd599337c8edbc5d91c2d0c48f5 100644
--- a/sky/engine/bindings/core/v8/V8GCController.cpp
+++ b/sky/engine/bindings/core/v8/V8GCController.cpp
@@ -381,26 +381,6 @@ void V8GCController::gcEpilogue(v8::GCType type, v8::GCCallbackFlags flags)
else if (type == v8::kGCTypeMarkSweepCompact)
majorGCEpilogue(isolate);
- // Forces a Blink heap garbage collection when a garbage collection
- // was forced from V8. This is used for tests that force GCs from
- // JavaScript to verify that objects die when expected.
- if (flags & v8::kGCCallbackFlagForced) {
- // This single GC is not enough for two reasons:
- // (1) The GC is not precise because the GC scans on-stack pointers conservatively.
- // (2) One GC is not enough to break a chain of persistent handles. It's possible that
- // some heap allocated objects own objects that contain persistent handles
- // pointing to other heap allocated objects. To break the chain, we need multiple GCs.
- //
- // Regarding (1), we force a precise GC at the end of the current event loop. So if you want
- // to collect all garbage, you need to wait until the next event loop.
- // Regarding (2), it would be OK in practice to trigger only one GC per gcEpilogue, because
- // GCController.collectAll() forces 7 V8's GC.
- Heap::collectGarbage(ThreadState::HeapPointersOnStack);
-
- // Forces a precise GC at the end of the current event loop.
- Heap::setForcePreciseGCForTesting();
- }
-
TRACE_EVENT_END1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "GCEvent", "usedHeapSizeAfter", usedHeapSize(isolate));
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", "data", InspectorUpdateCountersEvent::data());
}
« no previous file with comments | « sky/engine/bindings/core/v8/V8Binding.h ('k') | sky/engine/core/Init.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698