Please see the original question here:
http://stackoverflow.com/questions/39399717/is-it-possible-to-read-function-closure-via-v8-addo
<http://stackoverflow.com/questions/39399717/is-it-possible-to-read-function-closure-via-v8-addon>
I want to write a Node.js V8 addon in C++ that will give me access to
functions closures.
Something like this:
const myAddon = require('./build/Release/addon');
const counter = (() => {
let i = 0;
return () => ++i;
})();
counter(); // 1
counter(); // 2
const closure = myAddon(counter);
console.log(closure.i); // prints "3"
Is it possible? Where this information stored on the V8 engine
<http://v8.paulfryzel.com/docs/master/index.html>?
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/1eee21ad-87a5-43fa-b5f6-d37e657a01e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.