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

Unified Diff: runtime/lib/vmservice.cc

Issue 1393373003: Remove isolate argument from handle allocation: Part I (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanups 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/lib/mirrors.cc ('k') | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/vmservice.cc
diff --git a/runtime/lib/vmservice.cc b/runtime/lib/vmservice.cc
index 29581b45750073dae9126a06e7f904e28f5ee629..9a2cb2a7f45a7c96b959d97fdbb4a8a187c589c1 100644
--- a/runtime/lib/vmservice.cc
+++ b/runtime/lib/vmservice.cc
@@ -25,10 +25,10 @@ static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) {
class RegisterRunningIsolatesVisitor : public IsolateVisitor {
public:
- explicit RegisterRunningIsolatesVisitor(Isolate* service_isolate)
+ explicit RegisterRunningIsolatesVisitor(Thread* thread)
: IsolateVisitor(),
- register_function_(Function::Handle(service_isolate)),
- service_isolate_(service_isolate) {
+ register_function_(Function::Handle(thread->zone())),
+ service_isolate_(thread->isolate()) {
ASSERT(ServiceIsolate::IsServiceIsolate(Isolate::Current()));
// Get library.
const String& library_url = Symbols::DartVMService();
@@ -63,7 +63,7 @@ class RegisterRunningIsolatesVisitor : public IsolateVisitor {
args.SetAt(0, port_int);
args.SetAt(1, send_port);
args.SetAt(2, name);
- Object& r = Object::Handle(service_isolate_);
+ Object& r = Object::Handle(service_isolate_->current_zone());
r = DartEntry::InvokeFunction(register_function_, args);
if (FLAG_trace_service) {
OS::Print("vm-service: Isolate %s %" Pd64 " registered.\n",
@@ -115,7 +115,7 @@ DEFINE_NATIVE_ENTRY(VMService_OnStart, 0) {
ServiceIsolate::BootVmServiceLibrary();
// Register running isolates with service.
- RegisterRunningIsolatesVisitor register_isolates(isolate);
+ RegisterRunningIsolatesVisitor register_isolates(thread);
if (FLAG_trace_service) {
OS::Print("vm-service: Registering running isolates.\n");
}
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/benchmark_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698