Commit 0667e6bc authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[cleanup] Replace deprecated V8 functions in v8_unit_test

Use the Context variant of BooleanValue since BooleanValue() is
deprecated and will be removed soon.

Change-Id: I425db1b31740586579cba22ebd394648a71b9bf5
Reviewed-on: https://chromium-review.googlesource.com/1152814Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579734}
parent 588611ac
......@@ -132,7 +132,8 @@ bool V8UnitTest::RunJavascriptTestF(const std::string& test_fixture,
return false;
// Ok if ran successfully, passed tests, and didn't have console errors.
return result->BooleanValue() && g_test_result_ok && !g_had_errors;
return result->BooleanValue(context).ToChecked() && g_test_result_ok &&
!g_had_errors;
}
void V8UnitTest::InitPathsAndLibraries() {
......@@ -325,7 +326,9 @@ void V8UnitTest::ChromeSend(const v8::FunctionCallbackInfo<v8::Value>& args) {
EXPECT_EQ(2U, test_result->Length());
if (::testing::Test::HasNonfatalFailure())
return;
g_test_result_ok = test_result->Get(0)->BooleanValue();
g_test_result_ok = test_result->Get(0)
->BooleanValue(isolate->GetCurrentContext())
.ToChecked();
if (!g_test_result_ok) {
v8::String::Utf8Value message(isolate, test_result->Get(1));
LOG(ERROR) << *message;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment