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

Unified Diff: test/cctest/test-assembler-x64.cc

Issue 13483017: Unify the way cctest initalizes the VM for each test case. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed presubmit errors. Created 7 years, 8 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/test-assembler-mips.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-x64.cc
diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc
index d2ea771588c9ec7313cd41e9b5dba75a49ee44bb..669475ad8aba17dd4b4f4dd1f8ffe2c6bab7f933 100644
--- a/test/cctest/test-assembler-x64.cc
+++ b/test/cctest/test-assembler-x64.cc
@@ -88,16 +88,6 @@ static const v8::internal::Register arg2 = rsi;
#define __ assm.
-static v8::Persistent<v8::Context> env;
-
-
-static void InitializeVM() {
- if (env.IsEmpty()) {
- env = v8::Context::New();
- }
-}
-
-
TEST(AssemblerX64ReturnOperation) {
OS::SetUp();
// Allocate an executable page of memory.
@@ -361,8 +351,8 @@ TEST(OperandRegisterDependency) {
TEST(AssemblerX64LabelChaining) {
// Test chaining of label usages within instructions (issue 1644).
- InitializeVM();
- v8::HandleScope scope(env->GetIsolate());
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
Assembler assm(Isolate::Current(), NULL, 0);
Label target;
@@ -374,8 +364,8 @@ TEST(AssemblerX64LabelChaining) {
TEST(AssemblerMultiByteNop) {
- InitializeVM();
- v8::HandleScope scope(env->GetIsolate());
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
v8::internal::byte buffer[1024];
Isolate* isolate = Isolate::Current();
Assembler assm(isolate, buffer, sizeof(buffer));
« no previous file with comments | « test/cctest/test-assembler-mips.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698