Index: src/global-handles.cc |
diff --git a/src/global-handles.cc b/src/global-handles.cc |
index 8797895876b82ccf4d71a7ae17e1963732fea6fa..65e74e13062c88fd549d81a041a5ef6e91aee793 100644 |
--- a/src/global-handles.cc |
+++ b/src/global-handles.cc |
@@ -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); |