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

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

Issue 2073173002: Use the new loader mechanism to resolve URIs and load script files in gen_snapshot. This should all… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address issues that were found while testing with the flutter engine. Created 4 years, 6 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 | « runtime/bin/vmservice/loader.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 if (Dart_IsError(result)) { 335 if (Dart_IsError(result)) {
336 return result; 336 return result;
337 } 337 }
338 Dart_Handle library_url = Dart_LibraryUrl(library); 338 Dart_Handle library_url = Dart_LibraryUrl(library);
339 const char* library_url_string = NULL; 339 const char* library_url_string = NULL;
340 result = Dart_StringToCString(library_url, &library_url_string); 340 result = Dart_StringToCString(library_url, &library_url_string);
341 if (Dart_IsError(result)) { 341 if (Dart_IsError(result)) {
342 return result; 342 return result;
343 } 343 }
344 if (tag == Dart_kImportTag) { 344 if (tag == Dart_kImportTag) {
345 // Embedder handles all requests for external libraries. 345 UNREACHABLE();
346 return DartUtils::LibraryTagHandler(tag, library, url); 346 return Dart_Null();
347 } 347 }
348 ASSERT((tag == Dart_kSourceTag) || (tag == Dart_kCanonicalizeUrl)); 348 ASSERT((tag == Dart_kSourceTag) || (tag == Dart_kCanonicalizeUrl));
349 if (tag == Dart_kCanonicalizeUrl) { 349 if (tag == Dart_kCanonicalizeUrl) {
350 // url is already canonicalized. 350 // url is already canonicalized.
351 return url; 351 return url;
352 } 352 }
353 Dart_Handle source = GetSource(url_string); 353 Dart_Handle source = GetSource(url_string);
354 if (Dart_IsError(source)) { 354 if (Dart_IsError(source)) {
355 return source; 355 return source;
356 } 356 }
357 return Dart_LoadSource(library, url, source, 0, 0); 357 return Dart_LoadSource(library, url, source, 0, 0);
358 } 358 }
359 359
360 360
361 } // namespace bin 361 } // namespace bin
362 } // namespace dart 362 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/loader.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698