FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

48198 node api external strings by gabrielschulhof · Pull Request #48339 · nodejs/node · GitHub

/ node Public

48198 node api external strings - #48339

Closed
gabrielschulhof wants to merge 31 commits into
nodejs:mainfrom
gabrielschulhof:48198-node-api-external-strings
Closed

48198 node api external strings#48339
gabrielschulhof wants to merge 31 commits into
nodejs:mainfrom
gabrielschulhof:48198-node-api-external-strings

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/node-api

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jun 5, 2023
gabrielschulhof changed the title 48198 node api external strings [wip] 48198 node api external strings Jun 5, 2023
gabrielschulhof added the node-api Issues and PRs related to the Node-API. label Jun 5, 2023
Comment thread src/js_native_api_v8.cc Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Check with Electron if this is needed for strings.

Comment thread src/js_native_api_v8.cc Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is it OK if lengh is NAPI_AUTO_LENGTH?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Chose to assume that it is not, and used C++ string view to compute length.

Comment thread src/js_native_api_v8.cc Outdated
Comment thread src/js_native_api_v8.cc Outdated
Comment thread src/js_native_api_v8.cc Outdated
Comment thread src/js_native_api_v8.cc Outdated
gabrielschulhof force-pushed the 48198-node-api-external-strings branch from cf6e959 to 20ab0fb Compare June 7, 2023 15:25
gabrielschulhof changed the title [wip] 48198 node api external strings 48198 node api external strings Jun 8, 2023
Comment thread doc/api/n-api.md Outdated
Comment thread doc/api/n-api.md Outdated
Comment thread doc/api/n-api.md Outdated
Comment thread doc/api/n-api.md
Co-authored-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Comment thread src/js_native_api_v8.cc Outdated
Comment thread src/js_native_api_v8.cc Outdated
Comment thread doc/api/n-api.md
Comment thread doc/api/n-api.md
gabrielschulhof and others added 2 commits June 11, 2023 20:36
Co-authored-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
daeyeon added request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jun 12, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 12, 2023

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

gabrielschulhof added a commit that referenced this pull request Jun 14, 2023
Introduce APIs that allow for the creation of JavaScript strings without
copying the underlying native string into the engine. The APIs fall back
to regular string creation if the engine's external string APIs are
unavailable. In this case, an optional boolean out-parameter indicates
that the string was copied, and the optional finalizer is called if
given.

PR-URL: #48339
Fixes: #48198
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>

Copy link
Copy Markdown
Contributor Author

Landed in 60d9aed.

RafaelGSS pushed a commit that referenced this pull request Jul 3, 2023
Introduce APIs that allow for the creation of JavaScript strings without
copying the underlying native string into the engine. The APIs fall back
to regular string creation if the engine's external string APIs are
unavailable. In this case, an optional boolean out-parameter indicates
that the string was copied, and the optional finalizer is called if
given.

PR-URL: #48339
Fixes: #48198
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
RafaelGSS mentioned this pull request Jul 3, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Introduce APIs that allow for the creation of JavaScript strings without
copying the underlying native string into the engine. The APIs fall back
to regular string creation if the engine's external string APIs are
unavailable. In this case, an optional boolean out-parameter indicates
that the string was copied, and the optional finalizer is called if
given.

PR-URL: nodejs#48339
Fixes: nodejs#48198
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Introduce APIs that allow for the creation of JavaScript strings without
copying the underlying native string into the engine. The APIs fall back
to regular string creation if the engine's external string APIs are
unavailable. In this case, an optional boolean out-parameter indicates
that the string was copied, and the optional finalizer is called if
given.

PR-URL: nodejs#48339
Fixes: nodejs#48198
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
ruyadorno pushed a commit that referenced this pull request Sep 8, 2023
Introduce APIs that allow for the creation of JavaScript strings without
copying the underlying native string into the engine. The APIs fall back
to regular string creation if the engine's external string APIs are
unavailable. In this case, an optional boolean out-parameter indicates
that the string was copied, and the optional finalizer is called if
given.

PR-URL: #48339
Fixes: #48198
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
ruyadorno mentioned this pull request Sep 8, 2023
ruyadorno pushed a commit that referenced this pull request Sep 13, 2023
Introduce APIs that allow for the creation of JavaScript strings without
copying the underlying native string into the engine. The APIs fall back
to regular string creation if the engine's external string APIs are
unavailable. In this case, an optional boolean out-parameter indicates
that the string was copied, and the optional finalizer is called if
given.

PR-URL: #48339
Fixes: #48198
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
This file contains hidden or 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
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++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose v8::String::NewExternalOneByte and v8::String::NewExternalTwoByte to Node-API

3 participants


Back | FazBrowse Home | New Git URL