Fix version guard for ScriptOrigin constructors#989
Merged
kkoopa merged 2 commits intonodejs:mainfrom Feb 26, 2025
Merged
Conversation
The current version guard for Isolate-less ScriptOrigin constructors checks both V8_MAJOR_VERSION > 11 and V8_MINOR_VERSION > 7. Newer V8s with a minor version not greater than 7, such as V8 v13.2.152.36 of Electron v34.2.0, still fall back to deprecated constructors removed since V8 v12.7.23 and fail to compile. Fix the preprocessor logic to properly detect V8 v11.7+.
Contributor
Author
|
Also, where did the v11.7 cutoff come from? |
Collaborator
|
The cutoff looks like a simple oversight. Thank you for fixing it. I will release a new version. |
Collaborator
|
It fails testing on Node 21 https://github.com/nodejs/nan/actions/runs/13538593063/job/37854108934?pr=989 |
Collaborator
|
21.7.3 has |
Isolate-taking constructors were deprecate_soon'd in 2282b3d (12.1.140), deprecated in 0b52081 (12.6.175) and removed in 7cd2b0c (12.7.23). Corrected the version cutoff to 12.6.175 when the constructors in question were officially deprecated.
Contributor
Author
|
Corrected it to 12.6.175. Tested locally on Node 21 and all CI tests are passing as well. |
Collaborator
|
LGTM. I will get this out now. |
Merged
tmm1
added a commit
to tmm1/pprof-nodejs
that referenced
this pull request
Mar 21, 2025
szegedi
pushed a commit
to DataDog/pprof-nodejs
that referenced
this pull request
Apr 3, 2025
szegedi
pushed a commit
to DataDog/pprof-nodejs
that referenced
this pull request
Apr 8, 2025
szegedi
pushed a commit
to DataDog/pprof-nodejs
that referenced
this pull request
Apr 10, 2025
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current version guard for
Isolate-less ScriptOrigin constructors checks bothV8_MAJOR_VERSION > 11andV8_MINOR_VERSION > 7. Newer V8s with a minor version not greater than 7, such as V8 v13.2.152.36 of Electron v34.2.0, still fall back to deprecated constructors removed since V8 v12.7.23 and fail to compile.Fix the preprocessor logic to properly detect V8 v11.7+.