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> |