| Index: runtime/vm/dart_api_impl_test.cc
|
| ===================================================================
|
| --- runtime/vm/dart_api_impl_test.cc (revision 32801)
|
| +++ 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);
|
| @@ -3662,7 +3652,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());
|
| @@ -3731,7 +3721,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());
|
| @@ -3990,7 +3980,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);
|
| @@ -4068,8 +4057,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);
|
|
|
| @@ -4740,7 +4727,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);
|
| @@ -6478,6 +6464,7 @@
|
| ml.Notify();
|
| }
|
| if (interrupt_count == kInterruptCount) {
|
| + START_TIMER(Isolate::Current(), time_native_execution);
|
| Dart_EnterScope();
|
| Dart_Handle lib = Dart_LookupLibrary(NewString(TestCase::url()));
|
| EXPECT_VALID(lib);
|
| @@ -7074,7 +7061,6 @@
|
| Isolate* isolate = Isolate::Current();
|
| Dart_EnterScope();
|
| {
|
| - DARTSCOPE(isolate);
|
| Dart_Handle str = NewString("a string");
|
| EXPECT_VALID(str);
|
| EXPECT(Dart_IsString(str));
|
| @@ -7147,7 +7133,6 @@
|
| Isolate* isolate = Isolate::Current();
|
| Dart_EnterScope();
|
| {
|
| - DARTSCOPE(isolate);
|
| Dart_Handle s1 = NewString("s1");
|
| EXPECT_VALID(s1);
|
| EXPECT(Dart_IsString(s1));
|
| @@ -7231,7 +7216,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());
|
| @@ -7284,7 +7269,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));
|
| @@ -7360,7 +7345,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));
|
|
|