chore: modernize Value usage in converters (#34794)
* chore: modernize Value usage in converters * Date is parsed as an empty object now
This commit is contained in:
parent
d28ed0da20
commit
0ee7f14190
34 changed files with 203 additions and 829 deletions
|
@ -234,13 +234,13 @@ v8::Local<v8::Value> Converter<net::HttpRequestHeaders>::ToV8(
|
|||
bool Converter<net::HttpRequestHeaders>::FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
net::HttpRequestHeaders* out) {
|
||||
base::DictionaryValue dict;
|
||||
base::Value::Dict dict;
|
||||
if (!ConvertFromV8(isolate, val, &dict))
|
||||
return false;
|
||||
for (base::DictionaryValue::Iterator it(dict); !it.IsAtEnd(); it.Advance()) {
|
||||
if (it.value().is_string()) {
|
||||
std::string value = it.value().GetString();
|
||||
out->SetHeader(it.key(), value);
|
||||
for (const auto it : dict) {
|
||||
if (it.second.is_string()) {
|
||||
std::string value = it.second.GetString();
|
||||
out->SetHeader(it.first, value);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue