OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "bin/vmservice_impl.h" | 5 #include "bin/vmservice_impl.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 | 8 |
9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 Dart_Handle result; | 168 Dart_Handle result; |
169 | 169 |
170 Dart_Handle builtin_lib = | 170 Dart_Handle builtin_lib = |
171 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); | 171 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); |
172 SHUTDOWN_ON_ERROR(builtin_lib); | 172 SHUTDOWN_ON_ERROR(builtin_lib); |
173 | 173 |
174 // Prepare for script loading by setting up the 'print' and 'timer' | 174 // Prepare for script loading by setting up the 'print' and 'timer' |
175 // closures and setting up 'package root' for URI resolution. | 175 // closures and setting up 'package root' for URI resolution. |
176 result = DartUtils::PrepareForScriptLoading( | 176 result = DartUtils::PrepareForScriptLoading( |
177 NULL, NULL, true, false, builtin_lib); | 177 NULL, NULL, NULL, true, false, builtin_lib); |
178 SHUTDOWN_ON_ERROR(result); | 178 SHUTDOWN_ON_ERROR(result); |
179 | 179 |
180 // Load main script. | 180 // Load main script. |
181 Dart_SetLibraryTagHandler(LibraryTagHandler); | 181 Dart_SetLibraryTagHandler(LibraryTagHandler); |
182 Dart_Handle library = LoadScript(kVMServiceIOLibraryScriptResourceName); | 182 Dart_Handle library = LoadScript(kVMServiceIOLibraryScriptResourceName); |
183 ASSERT(library != Dart_Null()); | 183 ASSERT(library != Dart_Null()); |
184 SHUTDOWN_ON_ERROR(library); | 184 SHUTDOWN_ON_ERROR(library); |
185 result = Dart_SetNativeResolver(library, VmServiceIONativeResolver, NULL); | 185 result = Dart_SetNativeResolver(library, VmServiceIONativeResolver, NULL); |
186 SHUTDOWN_ON_ERROR(result); | 186 SHUTDOWN_ON_ERROR(result); |
187 result = Dart_FinalizeLoading(false); | 187 result = Dart_FinalizeLoading(false); |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 Dart_Handle source = GetSource(url_string); | 381 Dart_Handle source = GetSource(url_string); |
382 if (Dart_IsError(source)) { | 382 if (Dart_IsError(source)) { |
383 return source; | 383 return source; |
384 } | 384 } |
385 return Dart_LoadSource(library, url, source, 0, 0); | 385 return Dart_LoadSource(library, url, source, 0, 0); |
386 } | 386 } |
387 | 387 |
388 | 388 |
389 } // namespace bin | 389 } // namespace bin |
390 } // namespace dart | 390 } // namespace dart |
OLD | NEW |