-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix HandleScope docs #287
Closed
Closed
Fix HandleScope docs #287
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Fix HandleScope docs
It turns out `HandleScope::New` doesn't actually exist, so I'm not sure exactly how that should happen. Side note: Maybe it should, because I'm getting the error "Entering the V8 API without proper locking in place" when I just construct `HandleScope` so I think I'm missing something important that could be hidden using a factory function, but I don't know because I don't know why I'm running into this issue. =)
- Loading branch information
commit b23ead6db400c73662b4eced1a468f611203dc30
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ the section titled (Object lifetime management)[object_lifetime_management]. | |
Creates a new handle scope. | ||
|
||
```cpp | ||
HandleScope HandleScope::New(Napi:Env env); | ||
HandleScope::HandleScope(Napi:Env env); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. HandleScope(Napi::Env env); |
||
``` | ||
|
||
- `[in] Env`: The environment in which to construct the HandleScope object. | ||
- `[in] env`: The environment in which to construct the HandleScope object. | ||
|
||
Returns a new HandleScope | ||
|
||
|
@@ -28,11 +28,11 @@ Returns a new HandleScope | |
Creates a new handle scope. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above |
||
|
||
```cpp | ||
HandleScope HandleScope::New(napi_env env, napi_handle_scope scope); | ||
HandleScope::HandleScope(Napi::Env env, Napi::HandleScope scope); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. HandleScope(Napi::Env env, Napi::HandleScope scope); |
||
``` | ||
|
||
- `[in] env`: napi_env in which the scope passed in was created. | ||
- `[in] scope`: pre-existing napi_handle_scope. | ||
- `[in] env`: Napi::Env in which the scope passed in was created. | ||
- `[in] scope`: pre-existing Napi::HandleScope. | ||
|
||
Returns a new HandleScope instance which wraps the napi_handle_scope | ||
handle passed in. This can be used to mix usage of the C N-API | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should say "Creates a new handle scope on the stack"