| Index: runtime/vm/dart_api_impl_test.cc
|
| ===================================================================
|
| --- runtime/vm/dart_api_impl_test.cc (revision 1428)
|
| +++ runtime/vm/dart_api_impl_test.cc (working copy)
|
| @@ -66,8 +66,8 @@
|
|
|
| // Non-instance objects.
|
| {
|
| - Zone zone;
|
| - HandleScope hs;
|
| + Isolate* isolate = Isolate::Current();
|
| + DARTSCOPE(isolate);
|
| const Object& cls1 = Object::Handle(Object::null_class());
|
| const Object& cls2 = Object::Handle(Object::class_class());
|
| Dart_Handle class1 = Api::NewLocalHandle(cls1);
|
| @@ -493,8 +493,7 @@
|
| Dart_EnterScope();
|
| {
|
| EXPECT(state->top_scope() != NULL);
|
| - Zone zone;
|
| - HandleScope hs;
|
| + DARTSCOPE(isolate);
|
| const String& str1 = String::Handle(String::New("Test String"));
|
| Dart_Handle ref = Api::NewLocalHandle(str1);
|
| String& str2 = String::Handle();
|
| @@ -520,8 +519,7 @@
|
| Dart_Handle handles[2000];
|
| Dart_EnterScope();
|
| {
|
| - Zone zone;
|
| - HandleScope hs;
|
| + DARTSCOPE(isolate);
|
| const String& str1 = String::Handle(String::New(kTestString1));
|
| Dart_Handle ref1 = Api::NewLocalHandle(str1);
|
| for (int i = 0; i < 1000; i++) {
|
| @@ -547,8 +545,7 @@
|
| }
|
| Dart_ExitScope();
|
| {
|
| - Zone zone;
|
| - HandleScope hs;
|
| + DARTSCOPE(isolate);
|
| for (int i = 0; i < 500; i++) {
|
| String& str = String::Handle();
|
| str ^= Api::UnwrapHandle(handles[i]);
|
| @@ -617,8 +614,7 @@
|
| ApiLocalScope* scope = state->top_scope();
|
| Dart_Handle handles[300];
|
| {
|
| - Zone zone;
|
| - HandleScope hs;
|
| + DARTSCOPE(isolate);
|
| Smi& val = Smi::Handle();
|
|
|
| // Start a new scope and allocate some local handles.
|
| @@ -965,8 +961,8 @@
|
|
|
| Dart_CreateIsolate(NULL, NULL);
|
| {
|
| - Zone zone;
|
| - HandleScope scope;
|
| + Isolate* isolate = Isolate::Current();
|
| + DARTSCOPE(isolate);
|
| Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
|
| const int kNumNativeFields = 4;
|
|
|
| @@ -1187,8 +1183,8 @@
|
|
|
| Dart_CreateIsolate(NULL, NULL);
|
| {
|
| - Zone zone;
|
| - HandleScope scope;
|
| + Isolate* isolate = Isolate::Current();
|
| + DARTSCOPE(isolate);
|
| Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
|
|
|
| // Create a test library and Load up a test script in it.
|
| @@ -1376,8 +1372,8 @@
|
|
|
| Dart_CreateIsolate(NULL, NULL);
|
| {
|
| - Zone zone;
|
| - HandleScope scope;
|
| + Isolate* isolate = Isolate::Current();
|
| + DARTSCOPE(isolate);
|
| Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
|
|
|
| // Create a test library and Load up a test script in it.
|
| @@ -1448,8 +1444,8 @@
|
|
|
| Dart_CreateIsolate(NULL, NULL);
|
| {
|
| - Zone zone;
|
| - HandleScope scope;
|
| + Isolate* isolate = Isolate::Current();
|
| + DARTSCOPE(isolate);
|
| Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
|
|
|
| // Create a test library and Load up a test script in it.
|
| @@ -1751,8 +1747,8 @@
|
| Dart_CreateIsolate(NULL, NULL);
|
| Dart_EnterScope(); // Enter a Dart API scope for the unit test.
|
| {
|
| - Zone zone;
|
| - HandleScope hs;
|
| + Isolate* isolate = Isolate::Current();
|
| + DARTSCOPE(isolate);
|
|
|
| Dart_Handle function_name = Dart_NewString("toString");
|
| const int number_of_arguments = 0;
|
|
|