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

Unified Diff: third_party/WebKit/Source/platform/heap/ThreadState.cpp

Issue 1670093002: Do not initiate Oilpan GC if under known stack pressure. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/ThreadState.cpp
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index 9de5549437e8814087cb2df86d36621584ab65f4..1065cebb9701c4f3e2c08766b2ace65f143598fe 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -626,6 +626,11 @@ void ThreadState::willStartV8GC(BlinkGC::V8GCType gcType)
if (gcType == BlinkGC::V8MajorGC)
completeSweep();
+ // If stack room is currently at a high premium, do not initiate an
+ // Oilpan GC.
+ if (StackFrameDepth::hasInsufficientStackForGC())
+ return;
+
// The fact that the PageNavigation GC is scheduled means that there is
// a dead frame. In common cases, a sequence of Oilpan's GC => V8 GC =>
// Oilpan's GC is needed to collect the dead frame. So we force the
« no previous file with comments | « third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698