| Index: sdk/lib/_internal/pub/lib/src/barback/old_web_socket_api.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/barback/old_web_socket_api.dart b/sdk/lib/_internal/pub/lib/src/barback/old_web_socket_api.dart
|
| index 461e364393053339c863fa57ef8ace6148b935e2..b0eaf12ad141aff4ae57fb55b7988e500319688a 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/barback/old_web_socket_api.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/barback/old_web_socket_api.dart
|
| @@ -269,25 +269,26 @@ class OldWebSocketApi {
|
| /// If the asset is not in a directory being served by pub, returns an error:
|
| ///
|
| /// example/index.html -> NOT_SERVED error
|
| - Map _pathToUrls(Map command) {
|
| + Future<Map> _pathToUrls(Map command) {
|
| var assetPath = _validateString(command, "path");
|
| var line = _validateOptionalInt(command, "line");
|
|
|
| - var urls = _environment.getUrlsForAssetPath(assetPath);
|
| - if (urls.isEmpty) {
|
| - throw new _WebSocketException(_ErrorCode.NOT_SERVED,
|
| - 'Asset path "$assetPath" is not currently being served.');
|
| - }
|
| + return _environment.getUrlsForAssetPath(assetPath).then((urls) {
|
| + if (urls.isEmpty) {
|
| + throw new _WebSocketException(_ErrorCode.NOT_SERVED,
|
| + 'Asset path "$assetPath" is not currently being served.');
|
| + }
|
|
|
| - var result = {"urls": urls.map((url) => url.toString()).toList()};
|
| + var result = {"urls": urls.map((url) => url.toString()).toList()};
|
|
|
| - // Map the line.
|
| - // TODO(rnystrom): Right now, source maps are not supported and it just
|
| - // passes through the original line. This lets the editor start using
|
| - // this API before we've fully implemented it. See #12339 and #16061.
|
| - if (line != null) result["line"] = line;
|
| + // Map the line.
|
| + // TODO(rnystrom): Right now, source maps are not supported and it just
|
| + // passes through the original line. This lets the editor start using
|
| + // this API before we've fully implemented it. See #12339 and #16061.
|
| + if (line != null) result["line"] = line;
|
|
|
| - return result;
|
| + return result;
|
| + });
|
| }
|
|
|
| /// Given a relative directory path within the entrypoint package, binds a
|
|
|