Skip to content

Implement CallbackScope class#362

Closed
romandev wants to merge 1 commit into
nodejs:masterfrom
romandev:callback_scope
Closed

Implement CallbackScope class#362
romandev wants to merge 1 commit into
nodejs:masterfrom
romandev:callback_scope

Conversation

@romandev

@romandev romandev commented Oct 2, 2018

Copy link
Copy Markdown
Contributor

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

romandev commented Oct 2, 2018

Copy link
Copy Markdown
Contributor Author

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

mhdawson commented Oct 2, 2018

Copy link
Copy Markdown
Member

@romandev thanks for picking this up :)

@romandev romandev changed the title [WIP] Implement CallbackScope class Implement CallbackScope class Oct 15, 2018
@romandev

Copy link
Copy Markdown
Contributor Author

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

@NickNaso NickNaso left a comment

Copy link
Copy Markdown
Member

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.

Comment thread doc/callback_scope.md Outdated
```

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

Copy link
Copy Markdown
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

Comment thread doc/callback_scope.md Outdated
```

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

Copy link
Copy Markdown
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

Comment thread doc/callback_scope.md
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
Copy Markdown
Contributor Author

Addressed your comments. Thank you for review!

@romandev

Copy link
Copy Markdown
Contributor Author

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

@mhdawson mhdawson left a comment

Copy link
Copy Markdown
Member

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 <michael_dawson@ca.ibm.com>
Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@NickNaso.local>
@mhdawson

Copy link
Copy Markdown
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 <michael_dawson@ca.ibm.com>
Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@NickNaso.local>
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 <michael_dawson@ca.ibm.com>
Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@NickNaso.local>
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 <michael_dawson@ca.ibm.com>
Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@NickNaso.local>
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 <michael_dawson@ca.ibm.com>
Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@NickNaso.local>
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