Commit beb88c0a authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

[Weakrefs] Fix incorrect check about previous/next weakref

When iterating over the holdings inside the cleanup callback,
we could potentially unregister the weakref which is next or
prev on the key list causing these checks to be incorrect.

Bug: v8:9360, v8:8179
Change-Id: I53ea12346eb4882b16a82677b64ba2c756d23a1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1658161Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62165}
parent 1c1aa818
......@@ -1278,14 +1278,8 @@ void WeakCell::WeakCellVerify(Isolate* isolate) {
key_list_next().IsUndefined(isolate));
CHECK(key_list_prev().IsWeakCell() || key_list_prev().IsUndefined(isolate));
if (key_list_prev().IsWeakCell()) {
CHECK_EQ(WeakCell::cast(key_list_prev()).key_list_next(), *this);
}
CHECK(key_list_next().IsWeakCell() || key_list_next().IsUndefined(isolate));
if (key_list_next().IsWeakCell()) {
CHECK_EQ(WeakCell::cast(key_list_next()).key_list_prev(), *this);
}
CHECK(finalization_group().IsUndefined(isolate) ||
finalization_group().IsJSFinalizationGroup());
......
......@@ -242,8 +242,6 @@
# BUG(v8:9260)
'tools/profviz': [SKIP],
# BUG(v8:9360)
'harmony/weakrefs/unregister-inside-cleanup5': [SKIP],
}], # ALWAYS
['novfp3 == True', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment