Fix v8::External::Value calls for the new ExternalPointerTypeTag API#201
Merged
Merged
Conversation
Recent V8 versions (currently shipped by Chromium/Electron; not yet in
released Node.js) added an ExternalPointerTypeTag parameter to
v8::External::Value():
void* Value(ExternalPointerTypeTag tag) const; // V8 with sandbox tagging
void* Value() const; // earlier V8
The old zero-arg overload was removed, so edge-js fails to compile against
Electron 42's V8 with errors like:
src/dotnet/clrfunc.cpp(15): error C2660:
'v8::External::Value': function does not take 0 arguments
Six callsites of the form
(SomeWrap*)(correlator->Value())
in src/{CoreCLREmbedding,mono,dotnet}/{coreclrfunc,clrfunc,
coreclrnodejsfuncinvokecontext,nodejsfuncinvokecontext}.cpp are guarded on
the V8_EXTERNAL_POINTER_TAG_COUNT macro (defined in <v8-internal.h>
alongside the new signature) and pass v8::kExternalPointerTypeTagDefault
when the new API is in scope. The else branch reproduces the prior source
line-for-line, so the change is a no-op on every released Node.js V8 today.
The companion fix for nan's own callsites (which edge-js depends on) is in
nodejs/nan#1015; both fixes are needed for end-to-end builds against
Electron 42.
Owner
|
Appreciate quick PR |
Owner
|
Unfortunately it does not resolve Electron 42 issue. |
Owner
|
After merging changes from https://github.com/gdavidkov/nan/tree/refs/heads/fix/external-value-v8-13 there is still an issue with
/**
* A marker that captures the current stack start address.
*/
class V8_EXPORT StackStartMarker {
public:
StackStartMarker() : stack_start_(__builtin_frame_address(0)) {}
void* stack_start() const { return stack_start_; }
private:
void* stack_start_;
};
This code is not present in v8 14.6 |
Owner
|
@gdavidkov any ideas how to resolve it. |
Contributor
Author
|
It's a workaround, not a proper fix — I patched the headers. |
Owner
|
Released. |
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.
Recent V8 versions (currently shipped by Chromium/Electron; not yet in released Node.js) added an ExternalPointerTypeTag parameter to v8::External::Value():
The old zero-arg overload was removed, so edge-js fails to compile against Electron 42's V8 with errors like:
The companion fix for nan's own callsites (which edge-js depends on) is in nodejs/nan#1015; both fixes are needed for end-to-end builds against Electron 42.