| Index: runtime/vm/dart_api_impl_test.cc
|
| ===================================================================
|
| --- runtime/vm/dart_api_impl_test.cc (revision 32362)
|
| +++ runtime/vm/dart_api_impl_test.cc (working copy)
|
| @@ -543,8 +543,6 @@
|
|
|
| // Non-instance objects.
|
| {
|
| - Isolate* isolate = Isolate::Current();
|
| - DARTSCOPE(isolate);
|
| Dart_Handle lib1 = Dart_LookupLibrary(dart_core);
|
| Dart_Handle lib2 = Dart_LookupLibrary(dart_mirrors);
|
|
|
| @@ -1789,7 +1787,7 @@
|
| Dart_EnterScope();
|
| {
|
| EXPECT(state->top_scope() != NULL);
|
| - DARTSCOPE(isolate);
|
| + HANDLESCOPE(isolate);
|
| const String& str1 = String::Handle(String::New("Test String"));
|
| Dart_Handle ref = Api::NewHandle(isolate, str1.raw());
|
| String& str2 = String::Handle();
|
| @@ -1814,7 +1812,7 @@
|
| Dart_PersistentHandle handles[2000];
|
| Dart_EnterScope();
|
| {
|
| - DARTSCOPE(isolate);
|
| + HANDLESCOPE(isolate);
|
| Dart_Handle ref1 = Api::NewHandle(isolate, String::New(kTestString1));
|
| for (int i = 0; i < 1000; i++) {
|
| handles[i] = Dart_NewPersistentHandle(ref1);
|
| @@ -1876,7 +1874,6 @@
|
| EXPECT(isolate != NULL);
|
| ApiState* state = isolate->api_state();
|
| EXPECT(state != NULL);
|
| - DARTSCOPE(isolate);
|
|
|
| // Start with a known persistent handle.
|
| Dart_PersistentHandle obj1 = Dart_NewPersistentHandle(Dart_True());
|
| @@ -1907,7 +1904,7 @@
|
| EXPECT(isolate != NULL);
|
| ApiState* state = isolate->api_state();
|
| EXPECT(state != NULL);
|
| - DARTSCOPE(isolate);
|
| + HANDLESCOPE(isolate);
|
| String& str = String::Handle();
|
|
|
| // Start with a known persistent handle.
|
| @@ -1972,7 +1969,7 @@
|
| Dart_Handle old_ref;
|
| {
|
| Isolate* isolate = Isolate::Current();
|
| - DARTSCOPE(isolate);
|
| + HANDLESCOPE(isolate);
|
| old_ref = Api::NewHandle(isolate, String::New("old string", Heap::kOld));
|
| EXPECT_VALID(old_ref);
|
| }
|
| @@ -2134,8 +2131,6 @@
|
| Dart_EnterScope();
|
| {
|
| Isolate* isolate = Isolate::Current();
|
| - DARTSCOPE(isolate);
|
| -
|
| Dart_Handle local = Api::NewHandle(
|
| isolate, String::New("strongly reachable", Heap::kOld));
|
| strong = Dart_NewPersistentHandle(local);
|
| @@ -2352,7 +2347,6 @@
|
| Dart_EnterScope();
|
| {
|
| Isolate* isolate = Isolate::Current();
|
| - DARTSCOPE(isolate);
|
| new_pwph = Dart_NewPrologueWeakPersistentHandle(
|
| Api::NewHandle(isolate,
|
| String::New("new space prologue weak", Heap::kNew)),
|
| @@ -2439,8 +2433,6 @@
|
| Dart_EnterScope();
|
| {
|
| Isolate* isolate = Isolate::Current();
|
| - DARTSCOPE(isolate);
|
| -
|
| Dart_Handle local = Api::NewHandle(
|
| isolate, String::New("strongly reachable", Heap::kOld));
|
| strong = Dart_NewPersistentHandle(local);
|
| @@ -2545,8 +2537,6 @@
|
| Dart_EnterScope();
|
| {
|
| Isolate* isolate = Isolate::Current();
|
| - DARTSCOPE(isolate);
|
| -
|
| Dart_Handle local = Api::NewHandle(
|
| isolate, String::New("strongly reachable", Heap::kOld));
|
| strong = Dart_NewPersistentHandle(local);
|
| @@ -3661,7 +3651,7 @@
|
| // Invoke a function which returns an object of type NativeFields.
|
| result = Dart_Invoke(lib, NewString("testMain"), 0, NULL);
|
| EXPECT_VALID(result);
|
| - DARTSCOPE(Isolate::Current());
|
| + HANDLESCOPE(Isolate::Current());
|
| Instance& obj = Instance::Handle();
|
| obj ^= Api::UnwrapHandle(result);
|
| const Class& cls = Class::Handle(obj.clazz());
|
| @@ -3730,7 +3720,7 @@
|
| // Invoke a function which returns an object of type NativeFields.
|
| result = Dart_Invoke(lib, NewString("testMain"), 0, NULL);
|
| EXPECT_VALID(result);
|
| - DARTSCOPE(Isolate::Current());
|
| + HANDLESCOPE(Isolate::Current());
|
| Instance& obj = Instance::Handle();
|
| obj ^= Api::UnwrapHandle(result);
|
| const Class& cls = Class::Handle(obj.clazz());
|
| @@ -3989,7 +3979,6 @@
|
| " return () {};\n"
|
| "}\n";
|
| Dart_Handle result;
|
| - DARTSCOPE(Isolate::Current());
|
|
|
| // Create a test library and Load up a test script in it.
|
| Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
|
| @@ -4067,8 +4056,6 @@
|
| " };\n"
|
| "}\n";
|
|
|
| - DARTSCOPE(Isolate::Current());
|
| -
|
| // Create a test library and Load up a test script in it.
|
| Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
|
|
|
| @@ -4739,7 +4726,6 @@
|
| " return InvokeClosure.method2(10);\n"
|
| "}\n";
|
| Dart_Handle result;
|
| - DARTSCOPE(Isolate::Current());
|
|
|
| // Create a test library and Load up a test script in it.
|
| Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
|
| @@ -7073,7 +7059,6 @@
|
| Isolate* isolate = Isolate::Current();
|
| Dart_EnterScope();
|
| {
|
| - DARTSCOPE(isolate);
|
| Dart_Handle str = NewString("a string");
|
| EXPECT_VALID(str);
|
| EXPECT(Dart_IsString(str));
|
| @@ -7146,7 +7131,6 @@
|
| Isolate* isolate = Isolate::Current();
|
| Dart_EnterScope();
|
| {
|
| - DARTSCOPE(isolate);
|
| Dart_Handle s1 = NewString("s1");
|
| EXPECT_VALID(s1);
|
| EXPECT(Dart_IsString(s1));
|
| @@ -7230,7 +7214,7 @@
|
| isolate->heap()->CollectGarbage(Heap::kNew);
|
| isolate->heap()->CollectGarbage(Heap::kNew);
|
| {
|
| - DARTSCOPE(isolate);
|
| + HANDLESCOPE(isolate);
|
| String& handle = String::Handle();
|
| handle ^= Api::UnwrapHandle(str);
|
| EXPECT(handle.IsOld());
|
| @@ -7283,7 +7267,7 @@
|
| Isolate* isolate = Isolate::Current();
|
| Dart_EnterScope();
|
| {
|
| - DARTSCOPE(isolate);
|
| + HANDLESCOPE(isolate);
|
| Dart_Handle str = Api::NewHandle(isolate, String::New("str", Heap::kOld));
|
| EXPECT_VALID(str);
|
| EXPECT(Dart_IsString(str));
|
| @@ -7359,7 +7343,7 @@
|
| Isolate* isolate = Isolate::Current();
|
| Dart_EnterScope();
|
| {
|
| - DARTSCOPE(isolate);
|
| + HANDLESCOPE(isolate);
|
| Dart_Handle s1 = Api::NewHandle(isolate, String::New("s1", Heap::kOld));
|
| EXPECT_VALID(s1);
|
| EXPECT(Dart_IsString(s1));
|
|
|