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

Side by Side Diff: runtime/bin/vmservice_impl.cc

Issue 1232593003: - Implement .packages specification. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Walkup the directory hierarchy. Created 5 years, 4 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
OLDNEW
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 SetServerIPAndPort("", 0); 165 SetServerIPAndPort("", 0);
166 166
167 Dart_Handle result; 167 Dart_Handle result;
168 168
169 Dart_Handle builtin_lib = 169 Dart_Handle builtin_lib =
170 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); 170 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
171 SHUTDOWN_ON_ERROR(builtin_lib); 171 SHUTDOWN_ON_ERROR(builtin_lib);
172 172
173 // Prepare for script loading by setting up the 'print' and 'timer' 173 // Prepare for script loading by setting up the 'print' and 'timer'
174 // closures and setting up 'package root' for URI resolution. 174 // closures and setting up 'package root' for URI resolution.
175 result = DartUtils::PrepareForScriptLoading(NULL, true, false, builtin_lib); 175 result = DartUtils::PrepareForScriptLoading(
176 NULL, NULL, true, false, builtin_lib);
176 SHUTDOWN_ON_ERROR(result); 177 SHUTDOWN_ON_ERROR(result);
177 178
178 // Load main script. 179 // Load main script.
179 Dart_SetLibraryTagHandler(LibraryTagHandler); 180 Dart_SetLibraryTagHandler(LibraryTagHandler);
180 Dart_Handle library = LoadScript(kVMServiceIOLibraryScriptResourceName); 181 Dart_Handle library = LoadScript(kVMServiceIOLibraryScriptResourceName);
181 ASSERT(library != Dart_Null()); 182 ASSERT(library != Dart_Null());
182 SHUTDOWN_ON_ERROR(library); 183 SHUTDOWN_ON_ERROR(library);
183 result = Dart_SetNativeResolver(library, VmServiceIONativeResolver, NULL); 184 result = Dart_SetNativeResolver(library, VmServiceIONativeResolver, NULL);
184 SHUTDOWN_ON_ERROR(result); 185 SHUTDOWN_ON_ERROR(result);
185 result = Dart_FinalizeLoading(false); 186 result = Dart_FinalizeLoading(false);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 Dart_Handle source = GetSource(url_string); 378 Dart_Handle source = GetSource(url_string);
378 if (Dart_IsError(source)) { 379 if (Dart_IsError(source)) {
379 return source; 380 return source;
380 } 381 }
381 return Dart_LoadSource(library, url, source, 0, 0); 382 return Dart_LoadSource(library, url, source, 0, 0);
382 } 383 }
383 384
384 385
385 } // namespace bin 386 } // namespace bin
386 } // namespace dart 387 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698