From 7616855b2a90e03310ef8431274ffa37d78abe68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 29 Aug 2024 09:06:40 +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 PR-URL: https://github.com/nodejs/node/pull/54565 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Robert Nagy Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- 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 2cbcb5461e..36917f7555 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); }