Chromium Code Reviews| Index: runtime/vm/thread_test.cc |
| diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc |
| index 9651dff66c8bd04b75b34172c9129b3e82848c34..40ef35d29c1d67001f679ab0809d4d18ac52bc4f 100644 |
| --- a/runtime/vm/thread_test.cc |
| +++ b/runtime/vm/thread_test.cc |
| @@ -313,17 +313,19 @@ TEST_CASE(ManySimpleTasksWithZones) { |
| done_count = 0; |
| } |
| + // Get the information for the current isolate. |
| + // We only need to check the current isolate since all tasks are spawned |
| + // inside this single isolate. |
| JSONStream stream; |
| - Service::PrintJSONForVM(&stream, false); |
| + { |
| + JSONArray arr(&stream); |
| + arr.AddValue(isolate, false); |
|
Cutch
2016/12/12 21:28:42
Just call it directly:
isolate->PrintJSON(&stream
bkonyi
2016/12/12 21:33:23
Right... Done.
|
| + } |
| const char* json = stream.ToCString(); |
| // Confirm all expected entries are in the JSON output. |
| for (intptr_t i = 0; i < kTaskCount + 1; i++) { |
| Thread* thread = threads[i]; |
| - Isolate* thread_isolate = thread->isolate(); |
| - // Buffer can handle any possible input length given types. |
| - // char thread_address_buf[96]; |
| - // char isolate_address_buf[64]; |
| Zone* top_zone = thread->zone(); |
| Thread* current_thread = Thread::Current(); |
| @@ -350,17 +352,7 @@ TEST_CASE(ManySimpleTasksWithZones) { |
| "\"id\":\"threads\\/%" Pd "", |
| OSThread::ThreadIdToIntPtr(thread->os_thread()->trace_id())); |
| - // Ensure the isolate for each thread is valid. |
| - |
| - char* isolate_info_buf = |
| - OS::SCreate(current_zone, |
| - "\"type\":\"Isolate\"," |
| - "\"fixedId\":true," |
| - "\"id\":\"isolates\\/%" Pd64 "", |
| - static_cast<int64_t>(thread_isolate->main_port())); |
| - |
| EXPECT_SUBSTRING(thread_info_buf, json); |
| - EXPECT_SUBSTRING(isolate_info_buf, json); |
| } |
| // Unblock the tasks so they can finish. |