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

Unified Diff: src/api.cc

Issue 1287323002: [api] Do not force external GCs when only trying to synchronously process phantom callbacks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: forced flag still forced synchronous processing Created 5 years, 4 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 | « include/v8.h ('k') | src/global-handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 4f98293556bbd8d3eca3a15c2361c135477334f2..5bb56e6e722af5b415335642e86992229bc90230 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6882,11 +6882,13 @@ void Isolate::CollectAllGarbage(const char* gc_reason) {
i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap();
if (heap->incremental_marking()->IsStopped()) {
if (heap->incremental_marking()->CanBeActivated()) {
- heap->StartIncrementalMarking(i::Heap::kNoGCFlags, kGCCallbackFlagForced,
- gc_reason);
+ heap->StartIncrementalMarking(
+ i::Heap::kNoGCFlags,
+ kGCCallbackFlagSynchronousPhantomCallbackProcessing, gc_reason);
} else {
- heap->CollectAllGarbage(i::Heap::kNoGCFlags, gc_reason,
- kGCCallbackFlagForced);
+ heap->CollectAllGarbage(
+ i::Heap::kNoGCFlags, gc_reason,
+ kGCCallbackFlagSynchronousPhantomCallbackProcessing);
}
} else {
// Incremental marking is turned on an has already been started.
« no previous file with comments | « include/v8.h ('k') | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698