Update to Chromium version 94.0.4606.0 (#911515)

This commit is contained in:
Marshall Greenblatt
2021-08-19 19:40:49 -04:00
parent 955097ea77
commit 25c1947f1d
85 changed files with 745 additions and 726 deletions

View File

@ -256,17 +256,27 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
if (init_result_)
return init_result_.value();
// |tab_id| is optional so it's ok if it's not there.
int tab_id = -1;
if (args_->GetInteger(0, &tab_id) && tab_id < 0)
const auto list_view = args_->GetList();
if (list_view.size() < 2)
return set_init_result(VALIDATION_FAILURE);
const auto& tab_id_value = list_view[0];
// |tab_id| is optional so it's ok if it's not there.
int tab_id = -1;
if (tab_id_value.is_int()) {
// But if it is present, it needs to be non-negative.
tab_id = tab_id_value.GetInt();
if (tab_id < 0) {
return set_init_result(VALIDATION_FAILURE);
}
}
// |details| are not optional.
base::DictionaryValue* details_value = nullptr;
if (!args_->GetDictionary(1, &details_value))
const base::Value& details_value = list_view[1];
if (!details_value.is_dict())
return set_init_result(VALIDATION_FAILURE);
std::unique_ptr<InjectDetails> details(new InjectDetails());
if (!InjectDetails::Populate(*details_value, details.get()))
if (!InjectDetails::Populate(details_value, details.get()))
return set_init_result(VALIDATION_FAILURE);
// Find a browser that we can access, or fail with error.