Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2171)

Unified Diff: content/child/v8_value_converter_impl.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/webui/web_ui_message_handler.cc ('k') | content/child/v8_value_converter_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/v8_value_converter_impl.cc
diff --git a/content/child/v8_value_converter_impl.cc b/content/child/v8_value_converter_impl.cc
index 89378a8cb9dcfd1396f11f938e61ab7bd9c76d4d..0d05e8f292a8360e0ab9c932994643d6c1982d3b 100644
--- a/content/child/v8_value_converter_impl.cc
+++ b/content/child/v8_value_converter_impl.cc
@@ -360,7 +360,7 @@ std::unique_ptr<base::Value> V8ValueConverterImpl::FromV8ValueImpl(
return base::Value::CreateNullValue();
if (val->IsBoolean())
- return base::MakeUnique<base::FundamentalValue>(
+ return base::MakeUnique<base::Value>(
val->ToBoolean(isolate)->Value());
if (val->IsNumber() && strategy_) {
@@ -370,14 +370,14 @@ std::unique_ptr<base::Value> V8ValueConverterImpl::FromV8ValueImpl(
}
if (val->IsInt32())
- return base::MakeUnique<base::FundamentalValue>(
+ return base::MakeUnique<base::Value>(
val->ToInt32(isolate)->Value());
if (val->IsNumber()) {
double val_as_double = val.As<v8::Number>()->Value();
if (!std::isfinite(val_as_double))
return nullptr;
- return base::MakeUnique<base::FundamentalValue>(val_as_double);
+ return base::MakeUnique<base::Value>(val_as_double);
}
if (val->IsString()) {
@@ -402,7 +402,7 @@ std::unique_ptr<base::Value> V8ValueConverterImpl::FromV8ValueImpl(
// consistent within this class.
return FromV8Object(val->ToObject(isolate), state, isolate);
v8::Date* date = v8::Date::Cast(*val);
- return base::MakeUnique<base::FundamentalValue>(date->ValueOf() / 1000.0);
+ return base::MakeUnique<base::Value>(date->ValueOf() / 1000.0);
}
if (val->IsRegExp()) {
« no previous file with comments | « content/browser/webui/web_ui_message_handler.cc ('k') | content/child/v8_value_converter_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698