Skip to content

Commit

Permalink
CodeHealth: Remove use of Value::GetAsDouble
Browse files Browse the repository at this point in the history
This change removes the use of Value::GetAsDouble
and replaces with Value::is_double(), Value::GetDouble(),
Value::GetIfDouble().

extensions/renderer/activity_log_converter_strategy_unittest.cc

Bug: 1187006
Change-Id: Ib80543b7a8081e80c11f0877f3f691ec01341fb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3009302
Auto-Submit: Maksim Sadym <sadym@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899959}
  • Loading branch information
sadym-chromium authored and Chromium LUCI CQ committed Jul 9, 2021
1 parent f973179 commit c76aeb0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ class ActivityLogConverterStrategyTest : public testing::Test {

testing::AssertionResult VerifyDouble(v8::Local<v8::Value> v8_value,
double expected) {
double out;
std::unique_ptr<base::Value> value(
converter_->FromV8Value(v8_value, context()));
if (value->is_double() && value->GetAsDouble(&out) && out == expected)
if (value->is_double() && value->GetDouble() == expected)
return testing::AssertionSuccess();
return testing::AssertionFailure();
}
Expand Down

0 comments on commit c76aeb0

Please sign in to comment.