Remove base::Value::IsType
https://chromium-review.googlesource.com/659798
This commit is contained in:
parent
48c3340d95
commit
a315d6330c
8 changed files with 13 additions and 13 deletions
|
@ -188,7 +188,7 @@ bool Archive::Init() {
|
|||
std::string error;
|
||||
base::JSONReader reader;
|
||||
std::unique_ptr<base::Value> value(reader.ReadToValue(header));
|
||||
if (!value || !value->IsType(base::Value::Type::DICTIONARY)) {
|
||||
if (!value || !value->is_dict()) {
|
||||
LOG(ERROR) << "Failed to parse header: " << error;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -481,7 +481,7 @@ base::Value* V8ValueConverter::FromV8Object(v8::Local<v8::Object> val,
|
|||
// there *is* a "windowId" property, but since it should be an int, code
|
||||
// on the browser which doesn't additionally check for null will fail.
|
||||
// We can avoid all bugs related to this by stripping null.
|
||||
if (strip_null_from_objects_ && child->IsType(base::Value::Type::NONE))
|
||||
if (strip_null_from_objects_ && child->is_none())
|
||||
continue;
|
||||
|
||||
result->SetWithoutPathExpansion(std::string(*name_utf8, name_utf8.length()),
|
||||
|
|
|
@ -15,7 +15,7 @@ bool Converter<base::DictionaryValue>::FromV8(v8::Isolate* isolate,
|
|||
atom::V8ValueConverter converter;
|
||||
std::unique_ptr<base::Value> value(
|
||||
converter.FromV8Value(val, isolate->GetCurrentContext()));
|
||||
if (value && value->IsType(base::Value::Type::DICTIONARY)) {
|
||||
if (value && value->is_dict()) {
|
||||
out->Swap(static_cast<base::DictionaryValue*>(value.get()));
|
||||
return true;
|
||||
} else {
|
||||
|
@ -36,7 +36,7 @@ bool Converter<base::ListValue>::FromV8(v8::Isolate* isolate,
|
|||
atom::V8ValueConverter converter;
|
||||
std::unique_ptr<base::Value> value(
|
||||
converter.FromV8Value(val, isolate->GetCurrentContext()));
|
||||
if (value->IsType(base::Value::Type::LIST)) {
|
||||
if (value->is_list()) {
|
||||
out->Swap(static_cast<base::ListValue*>(value.get()));
|
||||
return true;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue