Skip to content

Commit

Permalink
napi: create napi_env as a real structure tied to the isolate
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, but
only if there isn't one already attached to the isolate, perhaps from
the registration of a pervious module.

3. the last exception and the info about the last error are stored in
the napi_env__ struct which is associated with the isolate via
v8::Isolate::SetData().

Fixes nodejs#198
Closes nodejs#206
  • Loading branch information
Gabriel Schulhof committed Mar 29, 2017
1 parent f4bbfee commit 8de9c90
Show file tree
Hide file tree
Showing 5 changed files with 349 additions and 332 deletions.
Loading

0 comments on commit 8de9c90

Please sign in to comment.