From c062b5242a7d3f91f7aed77dcfc90b7fc3a372aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 24 Aug 2024 19:09:39 +0200 Subject: [PATCH] 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 Reviewed-By: Cheng Zhao --- src/node_webstorage.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_webstorage.cc b/src/node_webstorage.cc index 15d142e3d8f6e6..ee6a00a9ec2324 100644 --- a/src/node_webstorage.cc +++ b/src/node_webstorage.cc @@ -572,8 +572,8 @@ static Intercepted StorageSetter(Local 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;