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

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

Issue 2386173002: reflow comments in Source/bindings/core/v8 (Closed)
Patch Set: Created 4 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
Index: third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
index b7fd54ad2023baeac542ff27a43d931ceeeb44e6..ba550a28e76deadff04231bc8ef97f5af452c36b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
@@ -135,7 +135,8 @@ class MinorGCUnmodifiedWrapperVisitor : public v8::PersistentHandleVisitor {
}
// FIXME: Remove the special handling for SVG elements.
// We currently can't collect SVG Elements from minor gc, as we have
- // strong references from SVG property tear-offs keeping context SVG element alive.
+ // strong references from SVG property tear-offs keeping context SVG
+ // element alive.
if (node->isSVGElement()) {
v8::Persistent<v8::Object>::Cast(*value).MarkActive();
return;
@@ -398,15 +399,18 @@ void V8GCController::gcEpilogue(v8::Isolate* isolate,
// 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.
+ // (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 multiple V8's GC.
+ // 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
+ // multiple V8's GC.
currentThreadState->collectGarbage(BlinkGC::HeapPointersOnStack,
BlinkGC::GCWithSweep,
BlinkGC::ForcedGC);

Powered by Google App Engine
This is Rietveld 408576698