Skip to content

Commit 7616855

Browse files
authored
src: disable fast methods for buffer.write
It should resolve the regressions while we work on fixing them. Refs: #54521 PR-URL: #54565 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 29cf623 commit 7616855

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/node_buffer.cc

+3-15
Original file line numberDiff line numberDiff line change
@@ -1554,21 +1554,9 @@ void Initialize(Local<Object> target,
15541554
SetMethod(context, target, "hexWrite", StringWrite<HEX>);
15551555
SetMethod(context, target, "ucs2Write", StringWrite<UCS2>);
15561556

1557-
SetFastMethod(context,
1558-
target,
1559-
"asciiWriteStatic",
1560-
SlowWriteString<ASCII>,
1561-
&fast_write_string);
1562-
SetFastMethod(context,
1563-
target,
1564-
"latin1WriteStatic",
1565-
SlowWriteString<LATIN1>,
1566-
&fast_write_string);
1567-
SetFastMethod(context,
1568-
target,
1569-
"utf8WriteStatic",
1570-
SlowWriteString<UTF8>,
1571-
&fast_write_string);
1557+
SetMethod(context, target, "asciiWriteStatic", SlowWriteString<ASCII>);
1558+
SetMethod(context, target, "latin1WriteStatic", SlowWriteString<LATIN1>);
1559+
SetMethod(context, target, "utf8WriteStatic", SlowWriteString<UTF8>);
15721560

15731561
SetMethod(context, target, "getZeroFillToggle", GetZeroFillToggle);
15741562
}

0 commit comments

Comments
 (0)