Skip to content

Commit

Permalink
node-api: add missing initialization of last error
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
mhdawson authored and danielleadams committed Jan 31, 2022
1 parent f35170f commit 32282f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js_native_api_v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ struct napi_env__ {
: isolate(context->GetIsolate()),
context_persistent(isolate, context) {
CHECK_EQ(isolate, context->GetIsolate());
napi_clear_last_error(this);
}
virtual ~napi_env__() {
// First we must finalize those references that have `napi_finalizer`
Expand Down

0 comments on commit 32282f5

Please sign in to comment.