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

Unified Diff: test/cctest/cctest.h

Issue 1427643005: Remove usage of deprecated APIs from test-api.cc. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase + resolve merge conflicts. Created 5 years, 1 month 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 | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index 6243ac5327d0e2a6ccb98ac7d99d93d10bec7b82..c20e573e57714837f371fa9c81f38261d1c6f65f 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -368,6 +368,12 @@ static inline v8::Local<v8::Script> v8_compile(const char* x) {
}
+static inline int32_t v8_run_int32value(v8::Local<v8::Script> script) {
+ v8::Local<v8::Context> context = CcTest::isolate()->GetCurrentContext();
+ return script->Run(context).ToLocalChecked()->Int32Value(context).FromJust();
+}
+
+
static inline v8::Local<v8::Script> CompileWithOrigin(
v8::Local<v8::String> source, v8::Local<v8::String> origin_url) {
v8::ScriptOrigin origin(origin_url);
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698