OLD | NEW |
---|---|
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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.h" | 5 #include "vm/bootstrap.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 | 8 |
9 #include "vm/bootstrap_natives.h" | 9 #include "vm/bootstrap_natives.h" |
10 #include "vm/dart_api_impl.h" | 10 #include "vm/dart_api_impl.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 // TODO(regis): Should we pass a buffer for error reporting? | 44 // TODO(regis): Should we pass a buffer for error reporting? |
45 return NULL; | 45 return NULL; |
46 } | 46 } |
47 } | 47 } |
48 } | 48 } |
49 return NULL; | 49 return NULL; |
50 } | 50 } |
51 | 51 |
52 | 52 |
53 void Bootstrap::SetupNativeResolver() { | 53 void Bootstrap::SetupNativeResolver() { |
54 Library& library = Library::Handle(Library::CoreLibrary()); | 54 Isolate* isolate = Isolate::Current(); |
55 Library& library = Library::Handle(); | |
56 | |
57 library = isolate->object_store()->core_library(); | |
Ivan Posva
2012/02/25 00:14:38
Why were these changes here needed?
Siggi Cherem (dart-lang)
2012/02/25 02:10:38
Reverted. I was integrating the changes from Todd
| |
55 ASSERT(!library.IsNull()); | 58 ASSERT(!library.IsNull()); |
56 library.set_native_entry_resolver( | 59 library.set_native_entry_resolver( |
57 reinterpret_cast<Dart_NativeEntryResolver>(NativeLookup)); | 60 reinterpret_cast<Dart_NativeEntryResolver>(NativeLookup)); |
58 library = Library::CoreImplLibrary(); | 61 |
62 library = isolate->object_store()->core_impl_library(); | |
59 ASSERT(!library.IsNull()); | 63 ASSERT(!library.IsNull()); |
60 library.set_native_entry_resolver( | 64 library.set_native_entry_resolver( |
61 reinterpret_cast<Dart_NativeEntryResolver>(NativeLookup)); | 65 reinterpret_cast<Dart_NativeEntryResolver>(NativeLookup)); |
66 | |
67 library = isolate->object_store()->isolate_library(); | |
68 ASSERT(!library.IsNull()); | |
69 library.set_native_entry_resolver( | |
70 reinterpret_cast<Dart_NativeEntryResolver>(NativeLookup)); | |
62 } | 71 } |
63 | 72 |
64 } // namespace dart | 73 } // namespace dart |
OLD | NEW |