From a7a10a7be71da6ef2623263af2d3fe5a163bafce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 26 Aug 2024 08:05:20 +0200 Subject: [PATCH] src: disable fast methods for `buffer.write` It should resolve the regressions while we work on fixing them. Refs: https://github.com/nodejs/node/issues/54521 --- src/node_buffer.cc | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 2cbcb5461e52d6..36917f75555422 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -1554,21 +1554,9 @@ void Initialize(Local target, SetMethod(context, target, "hexWrite", StringWrite); SetMethod(context, target, "ucs2Write", StringWrite); - SetFastMethod(context, - target, - "asciiWriteStatic", - SlowWriteString, - &fast_write_string); - SetFastMethod(context, - target, - "latin1WriteStatic", - SlowWriteString, - &fast_write_string); - SetFastMethod(context, - target, - "utf8WriteStatic", - SlowWriteString, - &fast_write_string); + SetMethod(context, target, "asciiWriteStatic", SlowWriteString); + SetMethod(context, target, "latin1WriteStatic", SlowWriteString); + SetMethod(context, target, "utf8WriteStatic", SlowWriteString); SetMethod(context, target, "getZeroFillToggle", GetZeroFillToggle); }