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

Unified Diff: test/cctest/interpreter/test-interpreter.cc

Issue 1421223005: Remove deprecated API functions from cctests/interpreter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/interpreter/test-interpreter.cc
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index 22bf575e66a3b532924629ace274125b7ff2f9fa..fa90b20a815d34af320f76f6f35cb1ab9726517c 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// TODO(rmcilroy): Remove this define after this flag is turned on globally
+#define V8_IMMINENT_DEPRECATION_WARNINGS
+
#include "src/v8.h"
#include "src/execution.h"
@@ -126,8 +129,12 @@ class InterpreterTester {
Handle<JSFunction> function;
if (source_) {
CompileRun(source_);
+ v8::Local<v8::Context> context =
+ v8::Isolate::GetCurrent()->GetCurrentContext();
Local<Function> api_function =
- Local<Function>::Cast(CcTest::global()->Get(v8_str(kFunctionName)));
+ Local<Function>::Cast(CcTest::global()
+ ->Get(context, v8_str(kFunctionName))
+ .ToLocalChecked());
function = Handle<JSFunction>::cast(v8::Utils::OpenHandle(*api_function));
} else {
int arg_count = sizeof...(A);
@@ -137,7 +144,7 @@ class InterpreterTester {
}
source += "){})";
function = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
- *v8::Handle<v8::Function>::Cast(CompileRun(source.c_str()))));
+ *v8::Local<v8::Function>::Cast(CompileRun(source.c_str()))));
function->ReplaceCode(
*isolate_->builtins()->InterpreterEntryTrampoline());
}
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698