| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Because any call to util.inspect() with an object results in inspectPromise() being called, Debug was being initialized even when it's not needed. Instead, the initialization is placed after the isPromise check.
Sorry, something went wrong.
|
LGTM pending CI (also, TIL Node has awesome things like vm.runInDebugContext('Debug')!) |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
|
||
| function inspectPromise(p) { | ||
| ensureDebugIsInitialized(); | ||
| // Only create a mirror if the object is a Promise. |
There was a problem hiding this comment.
This comment should probably be moved also
Sorry, something went wrong.
There was a problem hiding this comment.
Where to? Wouldn't the best place for the comment about checking whether it's a promise be right before the line that checks if it's a promise?
Sorry, something went wrong.
There was a problem hiding this comment.
I guess to me it's a little confusing since the comment is talking about creating a mirror which isn't done on the next line and the function name does not indicate that a mirror is being created. shrug
Sorry, something went wrong.
|
CI failures are strange, especially SmartOS. I suspect temporary infra borkage. Let's try again: |
Sorry, something went wrong.
|
CI failures now seem less problematic:
TL;DR: CI looks good: |
Sorry, something went wrong.
|
LGTM. Transient error on the arm buildbot and sequential/test-crypto-timing-safe-equal failure on one of the linux buildbots. Unlikely to be caused by this PR. |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
trying CI again: https://ci.nodejs.org/job/node-test-pull-request/4024/ |
Sorry, something went wrong.
|
kicking CI one more time in hopes of all green: https://ci.nodejs.org/job/node-test-pull-request/4078/ |
Sorry, something went wrong.
Because any call to util.inspect() with an object results in inspectPromise() being called, Debug was being initialized even when it's not needed. Instead, the initialization is placed after the isPromise check. PR-URL: #8452 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
|
The failures look like flaky issues to me. Hope you don't mind that I went ahead and landed in be07458 |
Sorry, something went wrong.
|
Don't mind at all 👍 |
Sorry, something went wrong.
|
@bengl @addaleax @jasnell should this be backported after some time on current? edit: fwiw this lands cleanly |
Sorry, something went wrong.
Because any call to util.inspect() with an object results in inspectPromise() being called, Debug was being initialized even when it's not needed. Instead, the initialization is placed after the isPromise check. PR-URL: #8452 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
|
ping @nodejs/lts |
Sorry, something went wrong.
|
This is a safe performance fix. I would be mildly in favour of backporting. |
Sorry, something went wrong.
Because any call to util.inspect() with an object results in inspectPromise() being called, Debug was being initialized even when it's not needed. Instead, the initialization is placed after the isPromise check. PR-URL: #8452 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Because any call to util.inspect() with an object results in inspectPromise() being called, Debug was being initialized even when it's not needed. Instead, the initialization is placed after the isPromise check. PR-URL: #8452 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
util
Description of change
Because any call to util.inspect() with an object results in
inspectPromise() being called, Debug was being initialized even when
it's not needed. Instead, the initialization is placed after the
isPromise check.