Skip to content

util: fix .format() not always calling toString when it should be

This makes sure that util.format('%s', object) will always call a user defined toString function. It was formerly not the case when the object had the function declared on the super class.

At the same time this also makes sure that getters won't be triggered accessing the constructor property.

Fixes: #30333 (closed)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading