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

n-api: clean up binding creation #36170

Closed

Conversation

gabrielschulhof
Copy link
Contributor

  • Remove dead code for GetterCallbackWrapper and
    SetterCallbackWrapper.
  • Factor out creation of new v8::Functions.
  • Factor out creation of new v8::FunctionTemplates.
  • Turn CallbackBundle into a class, internalizing creation of new
    instances and garbage collection.

Signed-off-by: @gabrielschulhof

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Nov 19, 2020

Review requested:

  • @nodejs/n-api

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 19, 2020
@gabrielschulhof gabrielschulhof added the node-api Issues and PRs related to the Node-API. label Nov 19, 2020
src/js_native_api_v8.cc Outdated Show resolved Hide resolved
* Remove dead code for `GetterCallbackWrapper` and
  `SetterCallbackWrapper`.
* Factor out creation of new `v8::Function`s.
* Factor out creation of new `v8::FunctionTemplate`s.
* Turn `CallbackBundle` into a class, internalizing creation of new
  instances and garbage collection.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: nodejs#36170
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

@gabrielschulhof gabrielschulhof added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 20, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 20, 2020
@nodejs-github-bot
Copy link
Collaborator

gabrielschulhof pushed a commit that referenced this pull request Nov 21, 2020
* Remove dead code for `GetterCallbackWrapper` and
  `SetterCallbackWrapper`.
* Factor out creation of new `v8::Function`s.
* Factor out creation of new `v8::FunctionTemplate`s.
* Turn `CallbackBundle` into a class, internalizing creation of new
  instances and garbage collection.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: #36170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
@gabrielschulhof
Copy link
Contributor Author

Landed in 03fd363.

codebytere pushed a commit that referenced this pull request Nov 22, 2020
* Remove dead code for `GetterCallbackWrapper` and
  `SetterCallbackWrapper`.
* Factor out creation of new `v8::Function`s.
* Factor out creation of new `v8::FunctionTemplate`s.
* Turn `CallbackBundle` into a class, internalizing creation of new
  instances and garbage collection.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: #36170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
@codebytere codebytere mentioned this pull request Nov 22, 2020
BethGriggs pushed a commit that referenced this pull request Dec 10, 2020
* Remove dead code for `GetterCallbackWrapper` and
  `SetterCallbackWrapper`.
* Factor out creation of new `v8::Function`s.
* Factor out creation of new `v8::FunctionTemplate`s.
* Turn `CallbackBundle` into a class, internalizing creation of new
  instances and garbage collection.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: #36170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
BethGriggs pushed a commit that referenced this pull request Dec 10, 2020
* Remove dead code for `GetterCallbackWrapper` and
  `SetterCallbackWrapper`.
* Factor out creation of new `v8::Function`s.
* Factor out creation of new `v8::FunctionTemplate`s.
* Turn `CallbackBundle` into a class, internalizing creation of new
  instances and garbage collection.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: #36170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
@BethGriggs BethGriggs mentioned this pull request Dec 10, 2020
BethGriggs pushed a commit that referenced this pull request Dec 15, 2020
* Remove dead code for `GetterCallbackWrapper` and
  `SetterCallbackWrapper`.
* Factor out creation of new `v8::Function`s.
* Factor out creation of new `v8::FunctionTemplate`s.
* Turn `CallbackBundle` into a class, internalizing creation of new
  instances and garbage collection.

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: #36170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
@gabrielschulhof gabrielschulhof deleted the simplify-callback branch January 28, 2021 00:14
@gabrielschulhof gabrielschulhof restored the simplify-callback branch January 28, 2021 05:40
@gabrielschulhof gabrielschulhof deleted the simplify-callback branch February 3, 2021 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants