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

Unified Diff: runtime/vm/zone_test.cc

Issue 1263513002: VM: Load allocation-top and -end via Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed cc tests Created 5 years, 4 months 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
« runtime/vm/isolate.h ('K') | « runtime/vm/thread_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/zone_test.cc
diff --git a/runtime/vm/zone_test.cc b/runtime/vm/zone_test.cc
index 580f9686727c839990217e393db33015221a9ee9..da5f208189d52c6353ea51365dda128a925c06ab 100644
--- a/runtime/vm/zone_test.cc
+++ b/runtime/vm/zone_test.cc
@@ -16,11 +16,9 @@ UNIT_TEST_CASE(AllocateZone) {
#if defined(DEBUG)
FLAG_trace_zones = true;
#endif
- Isolate::Flags vm_flags;
- Dart_IsolateFlags api_flags;
- vm_flags.CopyTo(&api_flags);
- Isolate* isolate = Isolate::Init(NULL, api_flags);
- EXPECT(Isolate::Current() == isolate);
+ Dart_CreateIsolate(
+ NULL, NULL, bin::isolate_snapshot_buffer, NULL, NULL, NULL);
+ Isolate* isolate = Isolate::Current();
EXPECT(isolate->current_zone() == NULL);
{
StackZone stack_zone(isolate);
@@ -72,8 +70,7 @@ UNIT_TEST_CASE(AllocateZone) {
EXPECT_LE(allocated_size, zone->SizeInBytes());
}
EXPECT(isolate->current_zone() == NULL);
- isolate->Shutdown();
- delete isolate;
+ Dart_ShutdownIsolate();
}
@@ -81,11 +78,9 @@ UNIT_TEST_CASE(AllocGeneric_Success) {
#if defined(DEBUG)
FLAG_trace_zones = true;
#endif
- Isolate::Flags vm_flags;
- Dart_IsolateFlags api_flags;
- vm_flags.CopyTo(&api_flags);
- Isolate* isolate = Isolate::Init(NULL, api_flags);
- EXPECT(Isolate::Current() == isolate);
+ Dart_CreateIsolate(
+ NULL, NULL, bin::isolate_snapshot_buffer, NULL, NULL, NULL);
+ Isolate* isolate = Isolate::Current();
EXPECT(isolate->current_zone() == NULL);
{
StackZone zone(isolate);
@@ -98,8 +93,7 @@ UNIT_TEST_CASE(AllocGeneric_Success) {
EXPECT_LE(allocated_size, zone.SizeInBytes());
}
EXPECT(isolate->current_zone() == NULL);
- isolate->Shutdown();
- delete isolate;
+ Dart_ShutdownIsolate();
}
@@ -108,11 +102,9 @@ UNIT_TEST_CASE(AllocGeneric_Overflow) {
#if defined(DEBUG)
FLAG_trace_zones = true;
#endif
- Isolate::Flags vm_flags;
- Dart_IsolateFlags api_flags;
- vm_flags.CopyTo(&api_flags);
- Isolate* isolate = Isolate::Init(NULL, api_flags);
- EXPECT(Isolate::Current() == isolate);
+ Dart_CreateIsolate(
+ NULL, NULL, bin::isolate_snapshot_buffer, NULL, NULL, NULL);
+ Isolate* isolate = Isolate::Current();
EXPECT(isolate->current_zone() == NULL);
{
StackZone zone(isolate);
@@ -121,8 +113,7 @@ UNIT_TEST_CASE(AllocGeneric_Overflow) {
const intptr_t kNumElements = (kIntptrMax / sizeof(uint32_t)) + 1;
zone.GetZone()->Alloc<uint32_t>(kNumElements);
}
- isolate->Shutdown();
- delete isolate;
+ Dart_ShutdownIsolate();
}
@@ -130,11 +121,9 @@ UNIT_TEST_CASE(ZoneAllocated) {
#if defined(DEBUG)
FLAG_trace_zones = true;
#endif
- Isolate::Flags vm_flags;
- Dart_IsolateFlags api_flags;
- vm_flags.CopyTo(&api_flags);
- Isolate* isolate = Isolate::Init(NULL, api_flags);
- EXPECT(Isolate::Current() == isolate);
+ Dart_CreateIsolate(
+ NULL, NULL, bin::isolate_snapshot_buffer, NULL, NULL, NULL);
+ Isolate* isolate = Isolate::Current();
EXPECT(isolate->current_zone() == NULL);
static int marker;
@@ -172,8 +161,7 @@ UNIT_TEST_CASE(ZoneAllocated) {
EXPECT_EQ(87, second->slot);
}
EXPECT(isolate->current_zone() == NULL);
- isolate->Shutdown();
- delete isolate;
+ Dart_ShutdownIsolate();
}
« runtime/vm/isolate.h ('K') | « runtime/vm/thread_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698