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 <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Michaël Zasso
2024-08-29 09:06:40 +02:00
committed by GitHub
parent 29cf623567
commit 7616855b2a

View File

@@ -1554,21 +1554,9 @@ void Initialize(Local<Object> target,
SetMethod(context, target, "hexWrite", StringWrite<HEX>);
SetMethod(context, target, "ucs2Write", StringWrite<UCS2>);
SetFastMethod(context,
target,
"asciiWriteStatic",
SlowWriteString<ASCII>,
&fast_write_string);
SetFastMethod(context,
target,
"latin1WriteStatic",
SlowWriteString<LATIN1>,
&fast_write_string);
SetFastMethod(context,
target,
"utf8WriteStatic",
SlowWriteString<UTF8>,
&fast_write_string);
SetMethod(context, target, "asciiWriteStatic", SlowWriteString<ASCII>);
SetMethod(context, target, "latin1WriteStatic", SlowWriteString<LATIN1>);
SetMethod(context, target, "utf8WriteStatic", SlowWriteString<UTF8>);
SetMethod(context, target, "getZeroFillToggle", GetZeroFillToggle);
}