Fix MakeWeak and IsWeakRetainer for global handles with finalizers.
BUG= Review-Url: https://codereview.chromium.org/1944813002 Cr-Commit-Position: refs/heads/master@{#36019}
This commit is contained in:
parent
d441100b70
commit
566c825d4a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user