Index: third_party/WebKit/Source/platform/heap/Heap.cpp |
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp |
index b743592002f0feb05132e6c6f26a0518c8a39aad..c36c0eb625f385a8632543321e722007ce67967f 100644 |
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp |
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp |
@@ -359,6 +359,11 @@ void ThreadHeap::WeakProcessing(Visitor* visitor) { |
TRACE_EVENT0("blink_gc", "ThreadHeap::weakProcessing"); |
double start_time = WTF::CurrentTimeMS(); |
+ // Weak processing may access unmarked objects but are forbidden from |
+ // ressurecting them. |
+ ThreadState::ObjectResurrectionForbiddenScope object_resurrection_forbidden( |
+ ThreadState::Current()); |
+ |
// Call weak callbacks on objects that may now be pointing to dead objects. |
while (PopAndInvokeWeakCallback(visitor)) { |
} |