Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/node_i18n.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ class ConverterObject : public BaseObject, Converter {

CHECK_GE(args.Length(), 3); // Converter, Buffer, Flags

Converter utf8("utf8");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this has the side effect of verifying that ICU is in a sane state? It'll CHECK when ucnv_open() fails.

But if that's the reason why it's there, it really could use an explaining comment. cc @jasnell.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed (and still do) that this is a leftover from when this code was written, tbh.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @addaleax is right

ConverterObject* converter;
ASSIGN_OR_RETURN_UNWRAP(&converter, args[0].As<Object>());
SPREAD_BUFFER_ARG(args[1], input_obj);
Expand Down