Skip to content

Commit

Permalink
src: use correct way to signal interceptor error
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
targos committed Aug 24, 2024
1 parent 6dce10f commit c062b52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_webstorage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c062b52

Please sign in to comment.