OLD | NEW |
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 #include "vm/dart_api_impl.h" | 6 #include "vm/dart_api_impl.h" |
7 #include "vm/datastream.h" | 7 #include "vm/datastream.h" |
8 #include "vm/exceptions.h" | 8 #include "vm/exceptions.h" |
9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 public: | 30 public: |
31 explicit RegisterRunningIsolatesVisitor(Thread* thread) | 31 explicit RegisterRunningIsolatesVisitor(Thread* thread) |
32 : IsolateVisitor(), | 32 : IsolateVisitor(), |
33 register_function_(Function::Handle(thread->zone())), | 33 register_function_(Function::Handle(thread->zone())), |
34 service_isolate_(thread->isolate()) { | 34 service_isolate_(thread->isolate()) { |
35 ASSERT(ServiceIsolate::IsServiceIsolate(Isolate::Current())); | 35 ASSERT(ServiceIsolate::IsServiceIsolate(Isolate::Current())); |
36 // Get library. | 36 // Get library. |
37 const String& library_url = Symbols::DartVMService(); | 37 const String& library_url = Symbols::DartVMService(); |
38 ASSERT(!library_url.IsNull()); | 38 ASSERT(!library_url.IsNull()); |
39 const Library& library = | 39 const Library& library = |
40 Library::Handle(Library::LookupLibrary(library_url)); | 40 Library::Handle(Library::LookupLibrary(thread, library_url)); |
41 ASSERT(!library.IsNull()); | 41 ASSERT(!library.IsNull()); |
42 // Get function. | 42 // Get function. |
43 const String& function_name = | 43 const String& function_name = |
44 String::Handle(String::New("_registerIsolate")); | 44 String::Handle(String::New("_registerIsolate")); |
45 ASSERT(!function_name.IsNull()); | 45 ASSERT(!function_name.IsNull()); |
46 register_function_ = library.LookupFunctionAllowPrivate(function_name); | 46 register_function_ = library.LookupFunctionAllowPrivate(function_name); |
47 ASSERT(!register_function_.IsNull()); | 47 ASSERT(!register_function_.IsNull()); |
48 } | 48 } |
49 | 49 |
50 virtual void VisitIsolate(Isolate* isolate) { | 50 virtual void VisitIsolate(Isolate* isolate) { |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 idx += 2; | 431 idx += 2; |
432 } | 432 } |
433 | 433 |
434 return result_list.raw(); | 434 return result_list.raw(); |
435 #else | 435 #else |
436 return Object::null(); | 436 return Object::null(); |
437 #endif | 437 #endif |
438 } | 438 } |
439 | 439 |
440 } // namespace dart | 440 } // namespace dart |
OLD | NEW |