chore: bump chromium to 7dff37844cb3 (master) (#18059)
This commit is contained in:
parent
00358545a9
commit
2616911f7a
77 changed files with 1636 additions and 294 deletions
|
@ -41,8 +41,12 @@ struct Converter<std::pair<Type1, Type2>> {
|
|||
v8::Local<v8::Array> array(v8::Local<v8::Array>::Cast(val));
|
||||
if (array->Length() != 2)
|
||||
return false;
|
||||
return Converter<Type1>::FromV8(isolate, array->Get(0), &out->first) &&
|
||||
Converter<Type2>::FromV8(isolate, array->Get(1), &out->second);
|
||||
|
||||
auto context = isolate->GetCurrentContext();
|
||||
return Converter<Type1>::FromV8(
|
||||
isolate, array->Get(context, 0).ToLocalChecked(), &out->first) &&
|
||||
Converter<Type2>::FromV8(
|
||||
isolate, array->Get(context, 1).ToLocalChecked(), &out->second);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -147,7 +147,8 @@ v8::Local<v8::Value> BindFunctionWith(v8::Isolate* isolate,
|
|||
v8::Local<v8::Function> func,
|
||||
v8::Local<v8::Value> arg1,
|
||||
v8::Local<v8::Value> arg2) {
|
||||
v8::MaybeLocal<v8::Value> bind = func->Get(mate::StringToV8(isolate, "bind"));
|
||||
v8::MaybeLocal<v8::Value> bind =
|
||||
func->Get(context, mate::StringToV8(isolate, "bind"));
|
||||
CHECK(!bind.IsEmpty());
|
||||
v8::Local<v8::Function> bind_func =
|
||||
v8::Local<v8::Function>::Cast(bind.ToLocalChecked());
|
||||
|
|
|
@ -211,7 +211,8 @@ bool Converter<net::HttpResponseHeaders*>::FromV8(
|
|||
if (localVal->IsArray()) {
|
||||
auto values = v8::Local<v8::Array>::Cast(localVal);
|
||||
for (uint32_t j = 0; j < values->Length(); j++) {
|
||||
if (!addHeaderFromValue(key, values->Get(j))) {
|
||||
if (!addHeaderFromValue(key,
|
||||
values->Get(context, j).ToLocalChecked())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,6 +204,7 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Array(
|
|||
v8::Isolate* isolate,
|
||||
const base::ListValue* val) const {
|
||||
v8::Local<v8::Array> result(v8::Array::New(isolate, val->GetSize()));
|
||||
auto context = isolate->GetCurrentContext();
|
||||
|
||||
for (size_t i = 0; i < val->GetSize(); ++i) {
|
||||
const base::Value* child = nullptr;
|
||||
|
@ -212,7 +213,7 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Array(
|
|||
v8::Local<v8::Value> child_v8 = ToV8ValueImpl(isolate, child);
|
||||
|
||||
v8::TryCatch try_catch(isolate);
|
||||
result->Set(static_cast<uint32_t>(i), child_v8);
|
||||
result->Set(context, static_cast<uint32_t>(i), child_v8).Check();
|
||||
if (try_catch.HasCaught())
|
||||
LOG(ERROR) << "Setter for index " << i << " threw an exception.";
|
||||
}
|
||||
|
@ -330,9 +331,10 @@ std::unique_ptr<base::Value> V8ValueConverter::FromV8ValueImpl(
|
|||
if (val->IsDate()) {
|
||||
v8::Date* date = v8::Date::Cast(*val);
|
||||
v8::Local<v8::Value> toISOString =
|
||||
date->Get(v8::String::NewFromUtf8(isolate, "toISOString",
|
||||
v8::NewStringType::kNormal)
|
||||
.ToLocalChecked());
|
||||
date->Get(context, v8::String::NewFromUtf8(isolate, "toISOString",
|
||||
v8::NewStringType::kNormal)
|
||||
.ToLocalChecked())
|
||||
.ToLocalChecked();
|
||||
if (toISOString->IsFunction()) {
|
||||
v8::MaybeLocal<v8::Value> result =
|
||||
toISOString.As<v8::Function>()->Call(context, val, 0, nullptr);
|
||||
|
|
|
@ -341,7 +341,7 @@ bool MoveItemToTrash(const base::FilePath& path) {
|
|||
// Elevation prompt enabled for UAC protected files. This overrides the
|
||||
// SILENT, NO_UI and NOERRORUI flags.
|
||||
|
||||
if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
|
||||
if (base::win::GetVersion() >= base::win::Version::WIN8) {
|
||||
// Windows 8 introduces the flag RECYCLEONDELETE and deprecates the
|
||||
// ALLOWUNDO in favor of ADDUNDORECORD.
|
||||
if (FAILED(pfo->SetOperationFlags(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue