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

Unified Diff: third_party/WebKit/Source/platform/heap/Heap.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/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)) {
}

Powered by Google App Engine
This is Rietveld 408576698