Commit b77eb38a authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[Cleanup] Avoid using deprecated v8::Function::Call in v8_unit_test.

BUG=v8:7290,v8:8238

Change-Id: I5fa49f67c25d7343835e70bf244242f7855da3a1
Reviewed-on: https://chromium-review.googlesource.com/c/1349259Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610808}
parent 4fec60db
...@@ -126,7 +126,9 @@ bool V8UnitTest::RunJavascriptTestF(const std::string& test_fixture, ...@@ -126,7 +126,9 @@ bool V8UnitTest::RunJavascriptTestF(const std::string& test_fixture,
params}; params};
v8::TryCatch try_catch(isolate); v8::TryCatch try_catch(isolate);
v8::Local<v8::Value> result = function->Call(context->Global(), 3, args); v8::Local<v8::Value> result =
function->Call(context, context->Global(), 3, args)
.FromMaybe(v8::Local<v8::Value>());
// The test fails if an exception was thrown. // The test fails if an exception was thrown.
EXPECT_FALSE(result.IsEmpty()); EXPECT_FALSE(result.IsEmpty());
if (::testing::Test::HasNonfatalFailure()) if (::testing::Test::HasNonfatalFailure())
...@@ -315,7 +317,9 @@ void V8UnitTest::TestFunction(const std::string& function_name) { ...@@ -315,7 +317,9 @@ void V8UnitTest::TestFunction(const std::string& function_name) {
v8::Local<v8::Function>::Cast(function_property); v8::Local<v8::Function>::Cast(function_property);
v8::TryCatch try_catch(isolate); v8::TryCatch try_catch(isolate);
v8::Local<v8::Value> result = function->Call(context->Global(), 0, NULL); v8::Local<v8::Value> result =
function->Call(context, context->Global(), 0, NULL)
.FromMaybe(v8::Local<v8::Value>());
// The test fails if an exception was thrown. // The test fails if an exception was thrown.
if (result.IsEmpty()) if (result.IsEmpty())
FAIL() << ExceptionToString(try_catch); FAIL() << ExceptionToString(try_catch);
......
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