process: keep process prototype in inheritance chain#14715
process: keep process prototype in inheritance chain#14715MSLaguana wants to merge 1 commit intonodejs:masterfrom
Conversation
lib/internal/bootstrap_node.js
Outdated
There was a problem hiding this comment.
Hi, @MSLaguana!
Sorry for the nits, but we have two ESLint complaints here.
16:11 error 'origProcProto' is assigned a value but never used no-unused-vars
17:1 error Line 17 exceeds the maximum line length of 80 max-lenThere was a problem hiding this comment.
Gah, that's what I get for writing the same thing on a few machines to test it all out. Fixed.
e43c580 to
c3dc069
Compare
|
Hi, @MSLaguana! Thanks for the PR and trying to introduce some more predictability/intuitiveness to Node.js. |
The global `process` object had its prototype replaced with a fresh object that had `EventEmitter.prototype` as its prototype. With this change, the original `process.constructor.prototype` is modified to have `EventEmitter.prototype` as its prototype, reflecting that `process` objects are also `EventEmitter`s. Fixes: nodejs#14699
c3dc069 to
a0b4a4a
Compare
|
@Trott fair point, added a test to make sure that |
|
Fresh CI: https://ci.nodejs.org/job/node-test-commit/11761/ This should be ready. |
|
CI is good Landed in cde272a, thanks for the PR! 🎉 |
The global `process` object had its prototype replaced with a fresh object that had `EventEmitter.prototype` as its prototype. With this change, the original `process.constructor.prototype` is modified to have `EventEmitter.prototype` as its prototype, reflecting that `process` objects are also `EventEmitter`s. Fixes: #14699 PR-URL: #14715 Reviewed-By: Anna Henningsen <anna@addaleax.net>
The global `process` object had its prototype replaced with a fresh object that had `EventEmitter.prototype` as its prototype. With this change, the original `process.constructor.prototype` is modified to have `EventEmitter.prototype` as its prototype, reflecting that `process` objects are also `EventEmitter`s. Fixes: #14699 PR-URL: #14715 Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
Should this be backported to |
|
ping re: backport |
|
Sorry for the delay. I don't think it is important to backport this, it was more for cleaning up (and to allow improvements in node-chakracore). |
The global
processobject had its prototype replaced with afresh object that had
EventEmitter.prototypeas its prototype.With this change, the original
process.constructor.prototypeismodified to have
EventEmitter.prototypeas its prototype, reflectingthat
processobjects are alsoEventEmitters.Fixes: #14699
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
process