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

Unified Diff: content/child/v8_value_converter_impl.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 10 months 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 50dde0fdd5ae01c477bf1992d2ed5c7017507a12..c57bd15c81b6e4366129180421f5367361eeef57 100644
--- a/content/child/v8_value_converter_impl.cc
+++ b/content/child/v8_value_converter_impl.cc
@@ -361,8 +361,7 @@ std::unique_ptr<base::Value> V8ValueConverterImpl::FromV8ValueImpl(
return base::Value::CreateNullValue();
if (val->IsBoolean())
- return base::MakeUnique<base::FundamentalValue>(
- val->ToBoolean(isolate)->Value());
+ return base::MakeUnique<base::Value>(val->ToBoolean(isolate)->Value());
if (val->IsNumber() && strategy_) {
std::unique_ptr<base::Value> out;
@@ -371,8 +370,7 @@ std::unique_ptr<base::Value> V8ValueConverterImpl::FromV8ValueImpl(
}
if (val->IsInt32())
- return base::MakeUnique<base::FundamentalValue>(
- val->ToInt32(isolate)->Value());
+ return base::MakeUnique<base::Value>(val->ToInt32(isolate)->Value());
if (val->IsNumber()) {
double val_as_double = val.As<v8::Number>()->Value();
@@ -382,8 +380,8 @@ std::unique_ptr<base::Value> V8ValueConverterImpl::FromV8ValueImpl(
// value is -0, it's treated internally as a double. Consumers are allowed
// to ignore this esoterica and treat it as an integer.
if (convert_negative_zero_to_int_ && val_as_double == 0.0)
- return base::MakeUnique<base::FundamentalValue>(0);
- return base::MakeUnique<base::FundamentalValue>(val_as_double);
+ return base::MakeUnique<base::Value>(0);
+ return base::MakeUnique<base::Value>(val_as_double);
}
if (val->IsString()) {
@@ -408,7 +406,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