Skip to content

Commit 5fe011a

Browse files
mhdawsontargos
authored andcommitted
node-api: add missing initialization of last error
- Add missing initiatlization of last error which was reported by coverity. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #41290 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
1 parent e808ee6 commit 5fe011a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/js_native_api_v8.h

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ struct napi_env__ {
5656
: isolate(context->GetIsolate()),
5757
context_persistent(isolate, context) {
5858
CHECK_EQ(isolate, context->GetIsolate());
59+
napi_clear_last_error(this);
5960
}
6061
virtual ~napi_env__() {
6162
// First we must finalize those references that have `napi_finalizer`

0 commit comments

Comments
 (0)