Commit 566c825d authored by ulan's avatar ulan Committed by Commit bot

Fix MakeWeak and IsWeakRetainer for global handles with finalizers.

BUG=

Review-Url: https://codereview.chromium.org/1944813002
Cr-Commit-Position: refs/heads/master@{#36019}
parent d441100b
......@@ -205,8 +205,8 @@ class GlobalHandles::Node {
bool IsWeakRetainer() const {
return state() == WEAK || state() == PENDING ||
(state() == NEAR_DEATH && weakness_type() == NORMAL_WEAK &&
weakness_type() != FINALIZER_WEAK);
(state() == NEAR_DEATH && (weakness_type() == NORMAL_WEAK ||
weakness_type() == FINALIZER_WEAK));
}
void MarkPending() {
......@@ -277,7 +277,7 @@ class GlobalHandles::Node {
set_weakness_type(PHANTOM_WEAK_2_INTERNAL_FIELDS);
break;
case v8::WeakCallbackType::kFinalizer:
set_weakness_type(NORMAL_WEAK);
set_weakness_type(FINALIZER_WEAK);
break;
}
set_parameter(parameter);
......
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