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

Side by Side Diff: runtime/bin/builtin.dart

Issue 2196593003: More fixes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights solveserved. Use of this source code is governed by a 2 // for details. All rights solveserved. 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 library builtin; 5 library builtin;
6 // NOTE: Do not import 'dart:io' in builtin. 6 // NOTE: Do not import 'dart:io' in builtin.
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:_internal'; 9 import 'dart:_internal';
10 import 'dart:isolate'; 10 import 'dart:isolate';
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 VMLibraryHooks.resourceReadAsBytes = _resourceReadAsBytes; 339 VMLibraryHooks.resourceReadAsBytes = _resourceReadAsBytes;
340 340
341 VMLibraryHooks.packageRootUriFuture = _getPackageRootFuture; 341 VMLibraryHooks.packageRootUriFuture = _getPackageRootFuture;
342 VMLibraryHooks.packageConfigUriFuture = _getPackageConfigFuture; 342 VMLibraryHooks.packageConfigUriFuture = _getPackageConfigFuture;
343 VMLibraryHooks.resolvePackageUriFuture = _resolvePackageUriFuture; 343 VMLibraryHooks.resolvePackageUriFuture = _resolvePackageUriFuture;
344 } 344 }
345 345
346 // Handling of Resource class by dispatching to the load port. 346 // Handling of Resource class by dispatching to the load port.
347 Future<List<int>> _resourceReadAsBytes(Uri uri) async { 347 Future<List<int>> _resourceReadAsBytes(Uri uri) async {
348 List response = await _makeLoaderRequest(_Dart_kResourceLoad, uri.toString()); 348 List response = await _makeLoaderRequest(_Dart_kResourceLoad, uri.toString());
349 if (response[3] is String) { 349 if (response[4] is String) {
350 // Throw the error. 350 // Throw the error.
351 throw response[3]; 351 throw response[4];
352 } else { 352 } else {
353 return response[3]; 353 return response[4];
354 } 354 }
355 } 355 }
356 356
357 Future<Uri> _getPackageRootFuture() { 357 Future<Uri> _getPackageRootFuture() {
358 if (_traceLoading) { 358 if (_traceLoading) {
359 _log("Request for package root from user code."); 359 _log("Request for package root from user code.");
360 } 360 }
361 return _makeLoaderRequest(_Dart_kGetPackageRootUri, null); 361 return _makeLoaderRequest(_Dart_kGetPackageRootUri, null);
362 } 362 }
363 363
(...skipping 22 matching lines...) Expand all
386 if (_traceLoading) { 386 if (_traceLoading) {
387 _log("Exception when resolving package URI: $packageUri"); 387 _log("Exception when resolving package URI: $packageUri");
388 } 388 }
389 result = null; 389 result = null;
390 } 390 }
391 if (_traceLoading) { 391 if (_traceLoading) {
392 _log("Resolved '$packageUri' to '$result'"); 392 _log("Resolved '$packageUri' to '$result'");
393 } 393 }
394 return result; 394 return result;
395 } 395 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698