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

fix: remove AllCan Read/Write #963

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MarshallOfSound
Copy link
Member

Refs https://chromium-review.googlesource.com/c/v8/v8/+/5006387

Fixes native module compilation against node 21 / incoming v8 changes

@kkoopa
Copy link
Collaborator

kkoopa commented Nov 15, 2023 via email

@MarshallOfSound
Copy link
Member Author

@kkoopa I could move settings after attribute and default it correctly in all cases, that should avoid the signature being meaningfully different 🤔 Although annoying because it wouldn't match the argument order to v8 but not the end of the world if the nan helper is deprecated anyway

@kkoopa
Copy link
Collaborator

kkoopa commented Nov 20, 2023 via email

@MarshallOfSound
Copy link
Member Author

Turns out the actual enum hasn't been removed, so the nan signature can be the same we just need to safely ifdef the impl.

Ref: https://source.chromium.org/chromium/chromium/src/+/main:v8/include/v8-object.h;l=173;bpv=1;bpt=1?q=v8::AccessControl&ss=chromium

Should be safe now

@kkoopa
Copy link
Collaborator

kkoopa commented Nov 21, 2023

Wonderful. That makes it a lot easier. Now, I would still like to have Nan::SetAccessor as it is in this PR deprecated and a new one added which does not have the settings parameter. Then, for old versions, it would set settings to Default when forwarding. This serves to maintain the identical behavior across versions: if one can't specify AccessControl, none shall do so. It also signals that a change has happened.

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.

None yet

2 participants