| OLD | NEW |
| 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 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 library builtin; | 5 library builtin; |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 import 'dart:isolate'; | 8 import 'dart:isolate'; |
| 9 | 9 |
| 10 | 10 |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 344 |
| 345 void _asyncLoadError(tag, uri, libraryUri, error) { | 345 void _asyncLoadError(tag, uri, libraryUri, error) { |
| 346 if (_logBuiltin) { | 346 if (_logBuiltin) { |
| 347 _print("_asyncLoadError($uri), error: $error"); | 347 _print("_asyncLoadError($uri), error: $error"); |
| 348 } | 348 } |
| 349 if (tag == Dart_kImportTag) { | 349 if (tag == Dart_kImportTag) { |
| 350 // When importing a library, the libraryUri is the imported | 350 // When importing a library, the libraryUri is the imported |
| 351 // uri. | 351 // uri. |
| 352 libraryUri = uri; | 352 libraryUri = uri; |
| 353 } | 353 } |
| 354 _asyncLoadErrorCallback(uri, libraryUri, new LoadError(error)); | 354 _asyncLoadErrorCallback(uri, libraryUri, new LoadError(error.toString())); |
| 355 _finishedOneLoadRequest(uri); | 355 _finishedOneLoadRequest(uri); |
| 356 } | 356 } |
| 357 | 357 |
| 358 | 358 |
| 359 _loadDataAsyncLoadPort(int tag, | 359 _loadDataAsyncLoadPort(int tag, |
| 360 String uri, | 360 String uri, |
| 361 String libraryUri, | 361 String libraryUri, |
| 362 Uri resourceUri) { | 362 Uri resourceUri) { |
| 363 var receivePort = new ReceivePort(); | 363 var receivePort = new ReceivePort(); |
| 364 receivePort.first.then((dataOrError) { | 364 receivePort.first.then((dataOrError) { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 } else { | 466 } else { |
| 467 name = userUri.substring(index + 1); | 467 name = userUri.substring(index + 1); |
| 468 path = userUri.substring(0, index + 1); | 468 path = userUri.substring(0, index + 1); |
| 469 } | 469 } |
| 470 | 470 |
| 471 path = _filePathFromUri(path); | 471 path = _filePathFromUri(path); |
| 472 var filename = _platformExtensionFileName(name); | 472 var filename = _platformExtensionFileName(name); |
| 473 | 473 |
| 474 return [path, filename, name]; | 474 return [path, filename, name]; |
| 475 } | 475 } |
| OLD | NEW |