Skip to content

Commit

Permalink
Oilapn: Fix for ephemeron iteration callback called after the table i…
Browse files Browse the repository at this point in the history
…s freed

Check if table_ exists because the table may be freed after the callback has been registered when incremental marking is enabled.

Bug: 757440
Change-Id: I677ae294f5d66f539ea6e68ddab29053aaf6c503
Reviewed-on: https://chromium-review.googlesource.com/896913
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534023}
  • Loading branch information
Keishi Hattori authored and Commit Bot committed Feb 2, 2018
1 parent ce85f38 commit 09f600f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion third_party/WebKit/Source/platform/wtf/HashTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -2060,7 +2060,10 @@ struct WeakProcessingHashTableHelper<kWeakHandlingInCollections,
static void EphemeronIteration(typename Allocator::Visitor* visitor,
void* closure) {
HashTableType* table = reinterpret_cast<HashTableType*>(closure);
DCHECK(table->table_);
// During incremental marking, the table may be freed after the callback has
// been registered.
if (!table->table_)
return;
// Check the hash table for elements that we now know will not be
// removed by weak processing. Those elements need to have their strong
// pointers traced.
Expand Down

0 comments on commit 09f600f

Please sign in to comment.