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

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

Issue 1955453002: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix precompiler handling. Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/bootstrap.cc » ('j') | runtime/vm/method_recognizer.h » ('J')
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 #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
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
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
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/bootstrap.cc » ('j') | runtime/vm/method_recognizer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698