Commit 9fecc3b4 authored by Mythri Alle's avatar Mythri Alle Committed by Commit Bot

Revert "[global-handles] Do not clear finalization callback on moving"

This reverts commit d8a457cb.

Reason for revert: I suspect that this caused the recent spike in the crashes on Canary. So, speculatively reverting this to see if things improve. More details on this bug:  chromium:931181

Original change's description:
> [global-handles] Do not clear finalization callback on moving
> 
> Bug: chromium:923361
> Change-Id: Id4a0f6515f6b17cec2732df561c1e82080dc29c8
> Reviewed-on: https://chromium-review.googlesource.com/c/1462963
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59498}

TBR=ulan@chromium.org,mlippautz@chromium.org

Change-Id: Id4d2f49be2a6a913f51f35db9877c5b098f9e20a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:923361, chromium:931181
Reviewed-on: https://chromium-review.googlesource.com/c/1466646Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59527}
parent cd1063ca
......@@ -654,7 +654,6 @@ class GlobalHandles::TracedNode final
set_parameter(parameter);
callback_ = callback;
}
bool HasFinalizationCallback() const { return callback_ != nullptr; }
void CollectPhantomCallbackData(
std::vector<std::pair<TracedNode*, PendingPhantomCallback>>*
......@@ -770,12 +769,7 @@ void GlobalHandles::MoveTracedGlobal(Address** from, Address** to) {
DCHECK_NOT_NULL(*to);
DCHECK_EQ(*from, *to);
TracedNode* node = TracedNode::FromLocation(*from);
// Only set the backpointer for clearing a phantom handle when there is no
// finalization callback attached. As soon as a callback is attached to a node
// the embedder is on its own when resetting a handle.
if (!node->HasFinalizationCallback()) {
node->set_parameter(to);
}
node->set_parameter(to);
}
void GlobalHandles::Destroy(Address* location) {
......
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