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

Unified Diff: third_party/WebKit/Source/platform/wtf/HashTable.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/wtf/HashTable.h
diff --git a/third_party/WebKit/Source/platform/wtf/HashTable.h b/third_party/WebKit/Source/platform/wtf/HashTable.h
index 0907c7420f897798365749fadea97240eb6041d2..800b4d5d941b2e1e5a48fe34d9578cdc189f32f3 100644
--- a/third_party/WebKit/Source/platform/wtf/HashTable.h
+++ b/third_party/WebKit/Source/platform/wtf/HashTable.h
@@ -836,6 +836,7 @@ class HashTable final
// expensive.
return key_count_ * kMinLoad < table_size_ &&
table_size_ > KeyTraits::kMinimumTableSize &&
+ !Allocator::IsObjectResurrectionForbidden() &&
sof 2017/04/15 18:57:31 Isn't this redundant (as IsAllocationAllowed() als
keishi 2017/04/17 06:37:55 Oops I modified HeapAllocator::IsAllocationAllowed
Allocator::IsAllocationAllowed();
}
ValueType* Expand(ValueType* entry = 0);
@@ -1641,6 +1642,7 @@ HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Allocator>::
ExpandBuffer(unsigned new_table_size, Value* entry, bool& success) {
success = false;
DCHECK_LT(table_size_, new_table_size);
+ CHECK(!Allocator::IsObjectResurrectionForbidden());
if (!Allocator::ExpandHashTableBacking(table_,
new_table_size * sizeof(ValueType)))
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698