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

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

Issue 1553233002: Add package config support to dart:isolate (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressed review comments. Created 4 years, 11 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 Dart_Handle result; 177 Dart_Handle result;
178 178
179 Dart_Handle builtin_lib = 179 Dart_Handle builtin_lib =
180 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); 180 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
181 SHUTDOWN_ON_ERROR(builtin_lib); 181 SHUTDOWN_ON_ERROR(builtin_lib);
182 182
183 // Prepare for script loading by setting up the 'print' and 'timer' 183 // Prepare for script loading by setting up the 'print' and 'timer'
184 // closures and setting up 'package root' for URI resolution. 184 // closures and setting up 'package root' for URI resolution.
185 result = DartUtils::PrepareForScriptLoading( 185 result = DartUtils::PrepareForScriptLoading(
186 NULL, NULL, NULL, true, false, builtin_lib); 186 NULL, NULL, true, false, builtin_lib);
187 SHUTDOWN_ON_ERROR(result); 187 SHUTDOWN_ON_ERROR(result);
188 188
189 if (running_precompiled) { 189 if (running_precompiled) {
190 Dart_Handle url = DartUtils::NewString(kVMServiceIOLibraryUri); 190 Dart_Handle url = DartUtils::NewString(kVMServiceIOLibraryUri);
191 Dart_Handle library = Dart_LookupLibrary(url); 191 Dart_Handle library = Dart_LookupLibrary(url);
192 SHUTDOWN_ON_ERROR(library); 192 SHUTDOWN_ON_ERROR(library);
193 result = Dart_SetRootLibrary(library); 193 result = Dart_SetRootLibrary(library);
194 SHUTDOWN_ON_ERROR(library); 194 SHUTDOWN_ON_ERROR(library);
195 result = Dart_SetNativeResolver(library, VmServiceIONativeResolver, NULL); 195 result = Dart_SetNativeResolver(library, VmServiceIONativeResolver, NULL);
196 SHUTDOWN_ON_ERROR(result); 196 SHUTDOWN_ON_ERROR(result);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 Dart_Handle source = GetSource(url_string); 350 Dart_Handle source = GetSource(url_string);
351 if (Dart_IsError(source)) { 351 if (Dart_IsError(source)) {
352 return source; 352 return source;
353 } 353 }
354 return Dart_LoadSource(library, url, source, 0, 0); 354 return Dart_LoadSource(library, url, source, 0, 0);
355 } 355 }
356 356
357 357
358 } // namespace bin 358 } // namespace bin
359 } // namespace dart 359 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698