Update to Chromium version 134.0.6998.0 (#1415337)

This commit is contained in:
Marshall Greenblatt
2025-02-12 12:35:33 -05:00
parent c8be96d15c
commit c7c6a109c9
88 changed files with 736 additions and 793 deletions

View File

@ -462,12 +462,12 @@ void GetCefString(v8::Isolate* isolate,
#if defined(CEF_STRING_TYPE_WIDE)
// Allocate enough space for a worst-case conversion.
int len = str->Utf8Length();
size_t len = str->Utf8LengthV2();
if (len == 0) {
return;
}
char* buf = new char[len + 1];
str->WriteUtf8(isolate, buf, len + 1);
str->WriteUtf8V2(isolate, buf, len, v8::String::WriteFlags::kNullTerminate);
// Perform conversion to the wide type.
cef_string_t* retws = out.GetWritableStruct();
@ -481,15 +481,16 @@ void GetCefString(v8::Isolate* isolate,
return;
}
char16_t* buf = new char16_t[len + 1];
str->Write(isolate, reinterpret_cast<uint16_t*>(buf), 0, len + 1);
str->WriteV2(isolate, 0, len, reinterpret_cast<uint16_t*>(buf),
v8::String::WriteFlags::kNullTerminate);
#else
// Allocate enough space for a worst-case conversion.
int len = str->Utf8Length();
size_t len = str->Utf8LengthV2();
if (len == 0) {
return;
}
char* buf = new char[len + 1];
str->WriteUtf8(isolate, buf, len + 1);
str->WriteUtf8V2(isolate, buf, len, v8::String::WriteFlags::kNullTerminate);
#endif
// Don't perform an extra string copy.