Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: src/global-handles.cc

Issue 1944813002: Fix MakeWeak and IsWeakRetainer for global handles with finalizers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698