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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapAllocator.h

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/HeapAllocator.h
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.h b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
index f52965b22cff122a5d648bfe3bbb2e57b75313e6..e6ff3d9c42a51cfc28b9d91b25bf3a56a80bd46f 100644
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.h
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
@@ -148,7 +148,12 @@ class PLATFORM_EXPORT HeapAllocator {
static void DeleteArray(void* ptr) { ASSERT_NOT_REACHED(); }
static bool IsAllocationAllowed() {
- return ThreadState::Current()->IsAllocationAllowed();
+ return ThreadState::Current()->IsAllocationAllowed() &&
+ !ThreadState::Current()->IsObjectResurrectionForbidden();
+ }
+
+ static bool IsObjectResurrectionForbidden() {
+ return ThreadState::Current()->IsObjectResurrectionForbidden();
}
template <typename T>

Powered by Google App Engine
This is Rietveld 408576698