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

Side by Side Diff: runtime/lib/vmservice.cc

Issue 1424703004: Getting rid of Isolate::current_zone() usage. Pass thread instead of isolate where it makes sense. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix build 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 unified diff | Download patch
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "vm/dart_api_impl.h" 7 #include "vm/dart_api_impl.h"
8 #include "vm/exceptions.h" 8 #include "vm/exceptions.h"
9 #include "vm/message.h" 9 #include "vm/message.h"
10 #include "vm/native_entry.h" 10 #include "vm/native_entry.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const Integer& port_int = Integer::Handle(Integer::New(port_id)); 56 const Integer& port_int = Integer::Handle(Integer::New(port_id));
57 ASSERT(!port_int.IsNull()); 57 ASSERT(!port_int.IsNull());
58 const SendPort& send_port = SendPort::Handle(SendPort::New(port_id)); 58 const SendPort& send_port = SendPort::Handle(SendPort::New(port_id));
59 const String& name = String::Handle(String::New(isolate->name())); 59 const String& name = String::Handle(String::New(isolate->name()));
60 ASSERT(!name.IsNull()); 60 ASSERT(!name.IsNull());
61 const Array& args = Array::Handle(Array::New(3)); 61 const Array& args = Array::Handle(Array::New(3));
62 ASSERT(!args.IsNull()); 62 ASSERT(!args.IsNull());
63 args.SetAt(0, port_int); 63 args.SetAt(0, port_int);
64 args.SetAt(1, send_port); 64 args.SetAt(1, send_port);
65 args.SetAt(2, name); 65 args.SetAt(2, name);
66 Object& r = Object::Handle(service_isolate_->current_zone()); 66 const Object& r = Object::Handle(
67 r = DartEntry::InvokeFunction(register_function_, args); 67 DartEntry::InvokeFunction(register_function_, args));
68 if (FLAG_trace_service) { 68 if (FLAG_trace_service) {
69 OS::Print("vm-service: Isolate %s %" Pd64 " registered.\n", 69 OS::Print("vm-service: Isolate %s %" Pd64 " registered.\n",
70 name.ToCString(), 70 name.ToCString(),
71 port_id); 71 port_id);
72 } 72 }
73 ASSERT(!r.IsError()); 73 ASSERT(!r.IsError());
74 } 74 }
75 75
76 private: 76 private:
77 Function& register_function_; 77 Function& register_function_;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 Service::CancelStream(stream_id.ToCString()); 145 Service::CancelStream(stream_id.ToCString());
146 return Object::null(); 146 return Object::null();
147 } 147 }
148 148
149 149
150 DEFINE_NATIVE_ENTRY(VMService_RequestAssets, 0) { 150 DEFINE_NATIVE_ENTRY(VMService_RequestAssets, 0) {
151 return Service::RequestAssets(); 151 return Service::RequestAssets();
152 } 152 }
153 153
154 } // namespace dart 154 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698