lib: instantiate console methods eagerly#14791
lib: instantiate console methods eagerly#14791bnoordhuis wants to merge 1 commit intonodejs:masterfrom
Conversation
lib/internal/bootstrap_node.js
Outdated
There was a problem hiding this comment.
What about other console methods though, like console.warn etc.?
There was a problem hiding this comment.
They're aliases for (e.g.) console.error.
There was a problem hiding this comment.
how about the new ones like console.count(), console.countReset() and console.clear()? Are those needed here also?
There was a problem hiding this comment.
seems like console.dir() should be included here as well as it's not an alias?
There was a problem hiding this comment.
Good point about console.dir(). The others seem less important but I've added them too.
Before this commit they were instantiated lazily but that fails when the first call is under stack overflow conditions. Fixes: nodejs/help#778
a87cf22 to
70bbb10
Compare
|
Rebased + new CI: https://ci.nodejs.org/job/node-test-pull-request/9705/ |
Before this commit they were instantiated lazily but that fails when the first call is under stack overflow conditions. PR-URL: #14791 Fixes: https://github.com/nodejs/help#778 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed in da1af3d |
Before this commit they were instantiated lazily but that fails when the first call is under stack overflow conditions. PR-URL: nodejs/node#14791 Fixes: https://github.com/nodejs/help#778 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Before this commit they were instantiated lazily but that fails when the first call is under stack overflow conditions. PR-URL: nodejs/node#14791 Fixes: https://github.com/nodejs/help#778 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Before this commit they were instantiated lazily but that fails when the first call is under stack overflow conditions. PR-URL: #14791 Fixes: https://github.com/nodejs/help#778 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Before this commit they were instantiated lazily but that fails when the first call is under stack overflow conditions. PR-URL: #14791 Fixes: https://github.com/nodejs/help#778 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Should this be backported to v6.x? If it is backported we will need to rewrite the test, as it relies on async / await |
|
@MylesBorins the test was actually removed again. |
Before this commit they were instantiated lazily but that fails when the
first call is under stack overflow conditions.
Fixes: nodejs/help#778
CI: https://ci.nodejs.org/job/node-test-pull-request/9629/