Skip to content

Commit

Permalink
src: disable fast methods for buffer.write
Browse files Browse the repository at this point in the history
It should resolve the regressions while we work on fixing them.

Refs: #54521
PR-URL: #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>
  • Loading branch information
targos authored and RafaelGSS committed Aug 30, 2024
1 parent 825d933 commit e071651
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/node_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e071651

Please sign in to comment.