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()) { |