Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 8528010: Changes to pass the current isolate to all runtime and native calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/dart_api_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
===================================================================
--- runtime/vm/dart_api_impl_test.cc (revision 1496)
+++ runtime/vm/dart_api_impl_test.cc (working copy)
@@ -120,8 +120,7 @@
// Non-instance objects.
{
- Zone zone;
- HandleScope hs;
+ DARTSCOPE(Isolate::Current());
const Object& cls1 = Object::Handle(Object::null_class());
const Object& cls2 = Object::Handle(Object::class_class());
Dart_Handle class1 = Api::NewLocalHandle(cls1);
@@ -542,8 +541,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();
@@ -569,8 +567,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++) {
@@ -596,8 +593,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]);
@@ -666,8 +662,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.
@@ -1012,8 +1007,7 @@
Dart_CreateIsolate(NULL, NULL);
{
- Zone zone;
- HandleScope scope;
+ DARTSCOPE(Isolate::Current());
Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
const int kNumNativeFields = 4;
@@ -1232,8 +1226,7 @@
Dart_CreateIsolate(NULL, NULL);
{
- Zone zone;
- HandleScope scope;
+ DARTSCOPE(Isolate::Current());
Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
// Create a test library and Load up a test script in it.
@@ -1419,8 +1412,7 @@
Dart_CreateIsolate(NULL, NULL);
{
- Zone zone;
- HandleScope scope;
+ DARTSCOPE(Isolate::Current());
Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
// Create a test library and Load up a test script in it.
@@ -1489,8 +1481,7 @@
Dart_CreateIsolate(NULL, NULL);
{
- Zone zone;
- HandleScope scope;
+ DARTSCOPE(Isolate::Current());
Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
// Create a test library and Load up a test script in it.
@@ -1784,8 +1775,7 @@
Dart_CreateIsolate(NULL, NULL);
Dart_EnterScope(); // Enter a Dart API scope for the unit test.
{
- Zone zone;
- HandleScope hs;
+ DARTSCOPE(Isolate::Current());
Dart_Handle function_name = Dart_NewString("toString");
const int number_of_arguments = 0;
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/dart_api_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698