Skip to content

Commit

Permalink
napi: create napi_env as a real structure
Browse files Browse the repository at this point in the history
1. We define struct napi_env__ to include the isolate, the last
exception, and the info about the last error.

2. We instantiate one struct napi_env__ during module registration and
we pass it into the FunctionCallbackInfo for all subsequent entries into
N-API when we create functions/accessors/finalizers.

Once module unloading will be supported we shall have to delete the
napi_env we create during module init.

Fixes nodejs#198
Closes nodejs#208
  • Loading branch information
Gabriel Schulhof committed Mar 29, 2017
1 parent 7136ee2 commit cb6a924
Showing 1 changed file with 419 additions and 402 deletions.
Loading

0 comments on commit cb6a924

Please sign in to comment.