src: use correct way to signal interceptor error

PR-URL: https://github.com/nodejs/node/pull/54418
Refs: https://github.com/nodejs/node/blob/e4f61de14f8cfb83f1ce0ad1597b86278cd5f5f1/deps/v8/include/v8-function-callback.h#L398-L408
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
Michaël Zasso authored and GitHub committed 2024-08-24 17:09:39 +00:00
1 parent 6dce10ff77
commit c062b5242a
1 file changed
+2 -2
+2 -2
View File
@@ -572,8 +572,8 @@ static Intercepted StorageSetter(Local<Name> property,
Storage* storage;
ASSIGN_OR_RETURN_UNWRAP(&storage, info.This(), Intercepted::kNo);
if (storage->Store(property, value)) {
info.GetReturnValue().Set(value);
if (!storage->Store(property, value)) {
info.GetReturnValue().SetFalse();
}
return Intercepted::kYes;