node-chakracore
node-chakracore copied to clipboard
this === global yields false in node-chakracore
this === global gives true on Node.js (tested 7.4.0) where as node-chakracore gives false (tested 7.0.0-pre9 and v8.0.0-nightly201701238e66382a18)
This breaks vows as it decides what to pass on as context object.
Reproducible on 8.4.0
Looks like the issue is that this === global.__proto__ rather than this === global.
The workaround I tried with vows was this.global === global, but your version should also work.
(This won't address the disparity between node and node-chakracore, however.)
Still an issue as of v10.1.0
$ nvs use node
PATH = node\10.2.1\x64
$ echo 'console.log(function(){return this === global}())' | node
true
$ nvs use chakracore
PATH = chakracore\10.1.0\x64
$ echo 'console.log(function(){return this === global}())' | node
false
Still an issue as of v10.6.0