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

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

Issue 2815663002: Disable collection backing reallocation during pre finalizer (Closed)
Patch Set: fix Created 3 years, 8 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/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 f090ee923ecfa4f9044f98d399921767c794ac6c..3367b03a10b8a24fc72aabc827ea2d1358f3ad6a 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -110,6 +110,7 @@ ThreadState::ThreadState()
gc_forbidden_count_(0),
mixins_being_constructed_count_(0),
accumulated_sweeping_time_(0),
+ object_resurrection_forbidden_(false),
vector_backing_arena_index_(BlinkGC::kVector1ArenaIndex),
current_arena_ages_(0),
gc_mixin_marker_(nullptr),
@@ -1268,6 +1269,9 @@ void ThreadState::InvokePreFinalizers() {
SweepForbiddenScope sweep_forbidden(this);
ScriptForbiddenIfMainThreadScope script_forbidden;
+ // Pre finalizers may access unmarked objects but are forbidden from
+ // ressurecting them.
+ ObjectResurrectionForbiddenScope object_resurrection_forbidden(this);
double start_time = WTF::CurrentTimeMS();
if (!ordered_pre_finalizers_.IsEmpty()) {

Powered by Google App Engine
This is Rietveld 408576698