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

Don't use soon-to-be-deprecated V8 Api #179

Merged

Conversation

isheludko
Copy link

V8 announced deprecation of the following methods:

  • v8::Objecit::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 CL 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).

V8 announced deprecation of the following methods:
 - v8::Objecit::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 CL 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).
@isheludko isheludko requested a review from victorgomes April 22, 2024 08:39
@victorgomes
Copy link
Member

LGTM!

@victorgomes victorgomes merged commit fc89994 into v8:node-ci-2024-03-21 Apr 22, 2024
8 of 14 checks passed
victorgomes pushed a commit that referenced this pull request Apr 23, 2024
V8 announced deprecation of the following methods:
 - v8::Objecit::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 CL 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).
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.

2 participants