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

Unified Diff: runtime/vm/service_test.cc

Issue 1401643002: Remove isolate parameter when allocating handles (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Sync Created 5 years, 2 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
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_test.cc
diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
index 406dfbb46c7be4e05c48c2772faa5cad1f37d6a1..de6a0d8ffe97ec288a170e22ecb22f835fbac711 100644
--- a/runtime/vm/service_test.cc
+++ b/runtime/vm/service_test.cc
@@ -55,9 +55,9 @@ static RawArray* Eval(Dart_Handle lib, const char* expr) {
const String& dummy_isolate_id = String::Handle(String::New("isolateId"));
Dart_Handle expr_val = Dart_EvaluateExpr(lib, NewString(expr));
EXPECT_VALID(expr_val);
- Isolate* isolate = Isolate::Current();
+ Zone* zone = Thread::Current()->zone();
const GrowableObjectArray& value =
- Api::UnwrapGrowableObjectArrayHandle(isolate, expr_val);
+ Api::UnwrapGrowableObjectArrayHandle(zone, expr_val);
const Array& result = Array::Handle(Array::MakeArray(value));
GrowableObjectArray& growable = GrowableObjectArray::Handle();
growable ^= result.At(4);
@@ -107,13 +107,14 @@ static RawClass* GetClass(const Library& lib, const char* name) {
TEST_CASE(Service_IdZones) {
- Isolate* isolate = Isolate::Current();
+ Zone* zone = thread->zone();
+ Isolate* isolate = thread->isolate();
ObjectIdRing* ring = isolate->object_id_ring();
- const String& test_a = String::Handle(isolate, String::New("a"));
- const String& test_b = String::Handle(isolate, String::New("b"));
- const String& test_c = String::Handle(isolate, String::New("c"));
- const String& test_d = String::Handle(isolate, String::New("d"));
+ const String& test_a = String::Handle(zone, String::New("a"));
+ const String& test_b = String::Handle(zone, String::New("b"));
+ const String& test_c = String::Handle(zone, String::New("c"));
+ const String& test_d = String::Handle(zone, String::New("d"));
// Both RingServiceIdZones share the same backing store and id space.
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698