diff options
author | Anna Henningsen <anna@addaleax.net> | 2016-10-25 22:13:24 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2016-11-02 23:19:31 +0100 |
commit | 0fb21df6e692bef9f55b9bfa876f3c59dc590332 (patch) | |
tree | 2d9ed924c10a278b2675e005c9b5c2a982969052 /test/parallel/test-global.js | |
parent | 45a716c9687849b7ade2ce01f2421c8f791f907c (diff) | |
download | android-node-v8-0fb21df6e692bef9f55b9bfa876f3c59dc590332.tar.gz android-node-v8-0fb21df6e692bef9f55b9bfa876f3c59dc590332.tar.bz2 android-node-v8-0fb21df6e692bef9f55b9bfa876f3c59dc590332.zip |
lib: make `String(global) === '[object global]'`
This inadvertently changed to `[object Object]` with the V8 upgrade
in 8a24728...96933df. Use `Symbol.toStringTag` to undo this
particular change.
Fixes: https://github.com/nodejs/node/issues/9274
PR-URL: https://github.com/nodejs/node/pull/9279
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'test/parallel/test-global.js')
-rw-r--r-- | test/parallel/test-global.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/parallel/test-global.js b/test/parallel/test-global.js index 1bf1bd7cd6..270faf1b77 100644 --- a/test/parallel/test-global.js +++ b/test/parallel/test-global.js @@ -21,3 +21,5 @@ const fooBar = module.fooBar; assert.strictEqual('foo', fooBar.foo, 'x -> global.x in sub level not working'); assert.strictEqual('bar', fooBar.bar, 'global.x -> x in sub level not working'); + +assert.strictEqual(Object.prototype.toString.call(global), '[object global]'); |