From 598986998cd6140400d113bc29bfab3d147bae00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sat, 25 Feb 2023 13:31:19 +0000 Subject: [PATCH] src: fix useless call in permission.cc FromMaybe() has no side effects and the return value is ignored. Use Check() instead to ensure that the operation succeeded. --- src/permission/permission.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/permission/permission.cc b/src/permission/permission.cc index c156133e64a13d..8f7d4a23c89a3f 100644 --- a/src/permission/permission.cc +++ b/src/permission/permission.cc @@ -143,7 +143,7 @@ void Permission::ThrowAccessDenied(Environment* env, PermissionToString(perm), v8::NewStringType::kNormal) .ToLocalChecked()) - .FromMaybe(false); + .Check(); err.As() ->Set(env->context(), env->resource_string(), @@ -151,7 +151,7 @@ void Permission::ThrowAccessDenied(Environment* env, std::string(res).c_str(), v8::NewStringType::kNormal) .ToLocalChecked()) - .FromMaybe(false); + .Check(); env->isolate()->ThrowException(err); }