| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3ef0a5b commit f1b2861
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,7 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | 39 | # Reset this number to 0 on major V8 upgrades. | |
| 40 | 40 | # Increment by one for each non-official patch applied to deps/v8. | |
| 41 | - 'v8_embedder_string': '-node.24', | ||
| 41 | + 'v8_embedder_string': '-node.25', | ||
| 42 | 42 | ||
| 43 | 43 | ##### V8 defaults for Node.js ##### | |
| 44 | 44 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1226,6 +1226,12 @@ size_t String::Utf8Length(Isolate* isolate, DirectHandle<String> string) { | |||
| 1226 | 1226 | reinterpret_cast<const char*>(vec.begin()), vec.size()); | |
| 1227 | 1227 | } | |
| 1228 | 1228 | ||
| 1229 | + base::Vector<const base::uc16> vec = content.ToUC16Vector(); | ||
| 1230 | + const char16_t* data = reinterpret_cast<const char16_t*>(vec.begin()); | ||
| 1231 | + if (simdutf::validate_utf16(data, vec.size())) { | ||
| 1232 | + return simdutf::utf8_length_from_utf16(data, vec.size()); | ||
| 1233 | + } | ||
| 1234 | + | ||
| 1229 | 1235 | // TODO(419496232): Use simdutf once upstream bug is resolved. | |
| 1230 | 1236 | size_t utf8_length = 0; | |
| 1231 | 1237 | uint16_t last_character = unibrow::Utf16::kNoPreviousCharacter; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments