process: make Symbol.toStringTag writable

The ecosystem broke by making it non-writable, so this is a good
intermediate fix.

PR-URL: https://github.com/nodejs/node/pull/26488
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
pull/26617/head
Ruben Bridgewater 2019-03-07 11:02:47 +01:00
parent f77555f792
commit 2a7da11ed8
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
2 changed files with 2 additions and 1 deletions

View File

@ -283,7 +283,7 @@ function setupProcessObject() {
EventEmitter.call(process);
Object.defineProperty(process, Symbol.toStringTag, {
enumerable: false,
writable: false,
writable: true,
configurable: false,
value: 'process'
});

View File

@ -4,3 +4,4 @@ import assert from 'assert';
import process from 'process';
assert.strictEqual(Object.prototype.toString.call(process), '[object process]');
assert(Object.getOwnPropertyDescriptor(process, Symbol.toStringTag).writable);