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)); |