Skip to content

Commit

Permalink
src: fix implementation of PropertySetterCallback
Browse files Browse the repository at this point in the history
V8 does not allow returning arbitrary values from the interceptor
setter callbacks, only a boolean return value is allowed. Since
default return value is `true`, it's not even necessary to set
the return value on a successful path.

Refs: https://crbug.com/348660658
PR-URL: #53576
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
  • Loading branch information
isheludko authored and aduh95 committed Jul 16, 2024
1 parent c68d873 commit 9bde9b2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,6 @@ Intercepted ContextifyContext::PropertySetterCallback(
// property
if (desc_obj->HasOwnProperty(context, env->get_string()).FromMaybe(false) ||
desc_obj->HasOwnProperty(context, env->set_string()).FromMaybe(false)) {
args.GetReturnValue().Set(value);
return Intercepted::kYes;
}
}
Expand Down

0 comments on commit 9bde9b2

Please sign in to comment.