Skip to content

Commit 4c83d44

Browse files
committed
Remove StringView (Latin-1) path in NativeString
1 parent baef293 commit 4c83d44

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

src/Utilities.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,7 @@ class NativeString {
166166
} else if (value->IsString()) {
167167
Local<String> string = Local<String>::Cast(value);
168168

169-
#if NODE_MODULE_VERSION >= 137
170-
if constexpr (AllowStringView) {
171-
172-
String::ValueView strView(isolate, string);
173-
if (strView.is_one_byte()) {
174-
length = strView.length();
175-
data = (char *) strView.data8();
176-
177-
return;
178-
}
179-
}
180-
#endif
169+
/* StringView path is Latin-1, not Utf-8 */
181170

182171
// Fallback
183172
length = string->Utf8Length(isolate);

0 commit comments

Comments
 (0)