Index: test/cctest/test-decls.cc |
diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc |
index 18f142061bb500842075f8110b5a86132bc8a4bf..8653d0e6c91d5adcd12728df20e587ded0d68a96 100644 |
--- a/test/cctest/test-decls.cc |
+++ b/test/cctest/test-decls.cc |
@@ -52,7 +52,7 @@ class DeclarationContext { |
virtual ~DeclarationContext() { |
if (is_initialized_) { |
- Isolate* isolate = Isolate::GetCurrent(); |
+ Isolate* isolate = CcTest::isolate(); |
HandleScope scope(isolate); |
Local<Context> context = Local<Context>::New(isolate, context_); |
context->Exit(); |
@@ -116,7 +116,7 @@ DeclarationContext::DeclarationContext() |
void DeclarationContext::InitializeIfNeeded() { |
if (is_initialized_) return; |
- Isolate* isolate = Isolate::GetCurrent(); |
+ Isolate* isolate = CcTest::isolate(); |
HandleScope scope(isolate); |
Local<FunctionTemplate> function = FunctionTemplate::New(); |
Local<Value> data = External::New(this); |
@@ -144,7 +144,7 @@ void DeclarationContext::Check(const char* source, |
// A retry after a GC may pollute the counts, so perform gc now |
// to avoid that. |
HEAP->CollectGarbage(v8::internal::NEW_SPACE); |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
TryCatch catcher; |
catcher.SetVerbose(true); |
Local<Script> script = Script::Compile(String::New(source)); |
@@ -226,7 +226,7 @@ v8::Handle<Integer> DeclarationContext::Query(Local<String> key) { |
// Test global declaration of a property the interceptor doesn't know |
// about and doesn't handle. |
TEST(Unknown) { |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
{ DeclarationContext context; |
context.Check("var x; x", |
@@ -281,7 +281,7 @@ class PresentPropertyContext: public DeclarationContext { |
TEST(Present) { |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
{ PresentPropertyContext context; |
context.Check("var x; x", |
@@ -335,7 +335,7 @@ class AbsentPropertyContext: public DeclarationContext { |
TEST(Absent) { |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
{ AbsentPropertyContext context; |
context.Check("var x; x", |
@@ -425,7 +425,7 @@ class AppearingPropertyContext: public DeclarationContext { |
TEST(Appearing) { |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
{ AppearingPropertyContext context; |
context.Check("var x; x", |
@@ -517,7 +517,7 @@ class ReappearingPropertyContext: public DeclarationContext { |
TEST(Reappearing) { |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
{ ReappearingPropertyContext context; |
context.Check("const x; var x = 0", |
@@ -546,7 +546,7 @@ class ExistsInPrototypeContext: public DeclarationContext { |
TEST(ExistsInPrototype) { |
i::FLAG_es52_globals = true; |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
// Sanity check to make sure that the holder of the interceptor |
// really is the prototype object. |
@@ -609,7 +609,7 @@ class AbsentInPrototypeContext: public DeclarationContext { |
TEST(AbsentInPrototype) { |
i::FLAG_es52_globals = true; |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
{ AbsentInPrototypeContext context; |
context.Check("if (false) { var x = 0; }; x", |
@@ -656,7 +656,7 @@ class ExistsInHiddenPrototypeContext: public DeclarationContext { |
TEST(ExistsInHiddenPrototype) { |
i::FLAG_es52_globals = true; |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
{ ExistsInHiddenPrototypeContext context; |
context.Check("var x; x", |
@@ -706,8 +706,8 @@ TEST(ExistsInHiddenPrototype) { |
class SimpleContext { |
public: |
SimpleContext() |
- : handle_scope_(Isolate::GetCurrent()), |
- context_(Context::New(Isolate::GetCurrent())) { |
+ : handle_scope_(CcTest::isolate()), |
+ context_(Context::New(CcTest::isolate())) { |
context_->Enter(); |
} |
@@ -749,7 +749,7 @@ class SimpleContext { |
TEST(CrossScriptReferences) { |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
{ SimpleContext context; |
context.Check("var x = 1; x", |
@@ -794,7 +794,7 @@ TEST(CrossScriptReferencesHarmony) { |
i::FLAG_harmony_scoping = true; |
i::FLAG_harmony_modules = true; |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
const char* decs[] = { |
"var x = 1; x", "x", "this.x", |
@@ -822,7 +822,7 @@ TEST(CrossScriptConflicts) { |
i::FLAG_harmony_scoping = true; |
i::FLAG_harmony_modules = true; |
- HandleScope scope(Isolate::GetCurrent()); |
+ HandleScope scope(CcTest::isolate()); |
const char* firsts[] = { |
"var x = 1; x", |