Conversation
mmomtchev
commented
Sep 23, 2026
mmomtchev
left a comment
Contributor
Author
There was a problem hiding this comment.
Returning a non-copyable object from a factory using an initializer-list is C++11.
Flarna
reviewed
Sep 25, 2026
| inline node::CallbackScope makeCallbackScope(v8::Local<v8::Object> target) { | ||
| return {v8::Isolate::GetCurrent(), target, context}; | ||
| } | ||
| #endif |
Member
There was a problem hiding this comment.
doesn't this require an ifdef for all users supporting ancient node.js versions if there is no dummy implementation for these older node.js versions?
Collaborator
|
You are right, there should be noop implementations for the ancient
versions.
…On Fri, Sep 25, 2026, 21:51 Gerhard Stöbich ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In nan.h <#1026 (comment)>:
> @@ -660,6 +660,12 @@ class AsyncResource {
#endif
}
+#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
+ inline node::CallbackScope makeCallbackScope(v8::Local<v8::Object> target) {
+ return {v8::Isolate::GetCurrent(), target, context};
+ }
+#endif
doesn't this require an ifdef for all consumer supporting ancient node.js
versions if there is no dummy implementation for these older node.js
versions?
—
Reply to this email directly, view it on GitHub
<#1026?email_source=notifications&email_token=AA7JXKOESZXZBKH6S3RD7R35Q25BVA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMZSGE2TAOJTHE42M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#pullrequestreview-5321509399>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7JXKOOLXTRTD2I5HHJQRL5Q25BVAVCNFSNUABEKJSXA33TNF2G64TZHMYTCNJUGU4TEOB3JFZXG5LFHM2TKNJTGU3TIOJZGCQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AA7JXKJWICMHP2BFZYKSST35Q25BVA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMZSGE2TAOJTHE42M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSVGM33PORSXEX3JN5ZQ>
and Android
<https://github.com/notifications/mobile/android/AA7JXKPFBHQI667LXA3IC4T5Q25BVA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMZSGE2TAOJTHE42M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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.
Refs: #1024
Add
nan::AsyncResource::makeCallbackScopewrapper aroiundnode::CallbackScope.The problem with calling
node::CallbackScopedirectly is that thenode::async_contextis a private member ofnan::AsyncResource.This allows to run properly the microtasks queue for async workers that do not call JavaScript.
This require Node.js 9.0.0, as before this version the microtasks queue was always run automatically.
In reality, Node.js 26.4.0 is the first version that actually does not do this, although this has been specified since Node.js 9.0.0.