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

Unified Diff: runtime/vm/object_id_ring_test.cc

Issue 1473403003: Move ApiLocalScope out of class ApiState into class Thread so that the API local handles and zone e… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-patch Created 5 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/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_id_ring_test.cc
diff --git a/runtime/vm/object_id_ring_test.cc b/runtime/vm/object_id_ring_test.cc
index 986757a8e9b6da81af27d04fb3033fe14cfd06e4..27347ea9b0f46d7ec6ffbe037940f9206dc0db5e 100644
--- a/runtime/vm/object_id_ring_test.cc
+++ b/runtime/vm/object_id_ring_test.cc
@@ -133,7 +133,7 @@ TEST_CASE(ObjectIdRingScavengeMoveTest) {
EXPECT(Dart_IsList(result));
EXPECT_VALID(Dart_ListLength(result, &list_length));
EXPECT_EQ(3, list_length);
- Isolate* isolate = Isolate::Current();
+ Isolate* isolate = thread->isolate();
Heap* heap = isolate->heap();
ObjectIdRing* ring = isolate->object_id_ring();
ObjectIdRing::LookupResult kind = ObjectIdRing::kInvalid;
@@ -174,7 +174,7 @@ TEST_CASE(ObjectIdRingScavengeMoveTest) {
EXPECT_NE(RawObject::ToAddr(raw_obj1), RawObject::ToAddr(raw_object_moved1));
EXPECT_NE(RawObject::ToAddr(raw_obj2), RawObject::ToAddr(raw_object_moved2));
// Test that we still point at the same list.
- Dart_Handle moved_handle = Api::NewHandle(isolate, raw_object_moved1);
+ Dart_Handle moved_handle = Api::NewHandle(thread, raw_object_moved1);
EXPECT_VALID(moved_handle);
EXPECT(!Dart_IsNull(moved_handle));
EXPECT(Dart_IsList(moved_handle));
@@ -188,7 +188,7 @@ TEST_CASE(ObjectIdRingScavengeMoveTest) {
// Test that the ring table is updated with nulls when the old GC collects.
TEST_CASE(ObjectIdRingOldGCTest) {
- Isolate* isolate = Isolate::Current();
+ Isolate* isolate = thread->isolate();
Heap* heap = isolate->heap();
ObjectIdRing* ring = isolate->object_id_ring();
@@ -199,7 +199,7 @@ TEST_CASE(ObjectIdRingOldGCTest) {
Dart_EnterScope();
Dart_Handle result;
// Create a string in the old heap.
- result = Api::NewHandle(isolate, String::New("old", Heap::kOld));
+ result = Api::NewHandle(thread, String::New("old", Heap::kOld));
EXPECT_VALID(result);
intptr_t string_length = 0;
// Inspect string.
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698