Skip to content

src: do not use soon-to-be-deprecated V8 API#53174

Closed
targos wants to merge 1 commit into
nodejs:mainfrom
targos:v8-data-property
Closed

src: do not use soon-to-be-deprecated V8 API#53174
targos wants to merge 1 commit into
nodejs:mainfrom
targos:v8-data-property

Conversation

@targos

@targos targos commented May 27, 2024

Copy link
Copy Markdown
Member

V8 announced deprecation of the following methods:

  • v8::Object::SetAccessor(...) in favor of v8::Object::SetNativeDataProperty(...),
  • v8::ObjectTemplate::SetNativeDataProperty(...) with AccessControl parameter in favor of v8::ObjectTemplate::SetNativeDataProperty(...) without AccessControl parameter.

See https://crrev.com/c/5006387.

This slightly changes behavior of the following properties:

  • process.debugPort (for worker processes),
  • process.title (for worker processes),
  • process.ppid.

The difference is that they will now behave like a regular writable JavaScript data properties - in case setter callback is not provided they will be be reconfigured from a native data property (the one that calls C++ callbacks upon get/set operations) to a real data property (so subsequent reads will no longer trigger C++ getter callbacks).

Loading
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-rebase Add this label to allow the Commit Queue to land a PR in several commits. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants