Skip to content
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

Implement CallbackScope class #362

Closed
wants to merge 1 commit into from

Conversation

romandev
Copy link
Contributor

@romandev romandev commented Oct 2, 2018

This is a wrapper class to support the following N-APIs.

  • napi_open_callback_scope()
  • napi_close_callback_scope()

Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope

@romandev
Copy link
Contributor Author

romandev commented Oct 2, 2018

If someone has a permission, please add DO NOT MERGE label.
This PR is still under development.
While I implement this feature, I have some questions.
So, I'd like to discuss about it. (I'll investigate it deeply myself and raise this issue again)

@mhdawson
Copy link
Member

mhdawson commented Oct 2, 2018

@romandev thanks for picking this up :)

@romandev romandev changed the title [WIP] Implement CallbackScope class Implement CallbackScope class Oct 15, 2018
@romandev
Copy link
Contributor Author

@mhdawson @NickNaso This PR is ready to review now.

Copy link
Member

@NickNaso NickNaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just few suggestion for documentation.

```

- `[in] env`: The environment in which to create the `Napi::CallbackScope`.
- `[in] scope`: pre-existing `napi_callback_scope` or `Napi::CallbackScope`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-existing -> The pre-existing

```

- `[in] env`: The environment in which to create the `Napi::CallbackScope`.
- `[in] async_context`: pre-existing `napi_async_context` or `Napi::AsyncContext`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-existing -> The pre-existing

doc/callback_scope.md Show resolved Hide resolved
This is a wrapper class to support the following N-APIs.
  - napi_open_callback_scope()
  - napi_close_callback_scope()

Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope
@romandev
Copy link
Contributor Author

Addressed your comments. Thank you for review!

@romandev
Copy link
Contributor Author

Could you please remove do not land label? (to avoid confusing)

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @romandev thanks for adding this.

mhdawson pushed a commit that referenced this pull request Oct 22, 2018
This is a wrapper class to support the following N-APIs.
  - napi_open_callback_scope()
  - napi_close_callback_scope()

Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope

PR-URL: #362
Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Nicola Del Gobbo <[email protected]>
@mhdawson
Copy link
Member

Landed as 405f3e5

@mhdawson mhdawson closed this Oct 22, 2018
kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
This is a wrapper class to support the following N-APIs.
  - napi_open_callback_scope()
  - napi_close_callback_scope()

Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope

PR-URL: nodejs/node-addon-api#362
Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Nicola Del Gobbo <[email protected]>
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
This is a wrapper class to support the following N-APIs.
  - napi_open_callback_scope()
  - napi_close_callback_scope()

Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope

PR-URL: nodejs/node-addon-api#362
Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Nicola Del Gobbo <[email protected]>
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
This is a wrapper class to support the following N-APIs.
  - napi_open_callback_scope()
  - napi_close_callback_scope()

Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope

PR-URL: nodejs/node-addon-api#362
Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Nicola Del Gobbo <[email protected]>
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
This is a wrapper class to support the following N-APIs.
  - napi_open_callback_scope()
  - napi_close_callback_scope()

Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope

PR-URL: nodejs/node-addon-api#362
Refs: https://nodejs.org/api/n-api.html#n_api_napi_open_callback_scope
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Nicola Del Gobbo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants