Skip to content

Commit

Permalink
Fix implementation of ContextifyContext::PropertySetterCallback() (#194)
Browse files Browse the repository at this point in the history
V8 doesn 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.

See https://crbug.com/348660658 for details.
  • Loading branch information
isheludko authored Jun 24, 2024
1 parent 286ed38 commit 8d04bd7
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 @@ -567,7 +567,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 8d04bd7

Please sign in to comment.