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

Side by Side Diff: runtime/lib/vmservice_patch.dart

Issue 2793603002: Nicer message when attempting to use Observatory from dart_bootstrap, dart_precompiled_runtime or a… (Closed)
Patch Set: Created 3 years, 8 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/server.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 @patch 5 @patch
6 class Asset { 6 class Asset {
7 /// Call to request assets from the embedder. 7 /// Call to request assets from the embedder.
8 @patch 8 @patch
9 static HashMap<String, Asset> request() { 9 static HashMap<String, Asset> request() {
10 HashMap<String, Asset> assets = new HashMap<String, Asset>();
11 Uint8List tarBytes = _requestAssets(); 10 Uint8List tarBytes = _requestAssets();
12 if (tarBytes == null) { 11 if (tarBytes == null) {
13 return assets; 12 return null;
14 } 13 }
15 List assetList = _decodeAssets(tarBytes); 14 List assetList = _decodeAssets(tarBytes);
15 HashMap<String, Asset> assets = new HashMap<String, Asset>();
16 for (int i = 0; i < assetList.length; i += 2) { 16 for (int i = 0; i < assetList.length; i += 2) {
17 var a = new Asset(assetList[i], assetList[i + 1]); 17 var a = new Asset(assetList[i], assetList[i + 1]);
18 assets[a.name] = a; 18 assets[a.name] = a;
19 } 19 }
20 return assets; 20 return assets;
21 } 21 }
22 } 22 }
23 23
24 List _decodeAssets(Uint8List data) native "VMService_DecodeAssets"; 24 List _decodeAssets(Uint8List data) native "VMService_DecodeAssets";
25 25
(...skipping 13 matching lines...) Expand all
39 void onServerAddressChange(String address) 39 void onServerAddressChange(String address)
40 native "VMService_OnServerAddressChange"; 40 native "VMService_OnServerAddressChange";
41 @patch 41 @patch
42 bool _vmListenStream(String streamId) native "VMService_ListenStream"; 42 bool _vmListenStream(String streamId) native "VMService_ListenStream";
43 @patch 43 @patch
44 void _vmCancelStream(String streamId) native "VMService_CancelStream"; 44 void _vmCancelStream(String streamId) native "VMService_CancelStream";
45 @patch 45 @patch
46 Uint8List _requestAssets() native "VMService_RequestAssets"; 46 Uint8List _requestAssets() native "VMService_RequestAssets";
47 @patch 47 @patch
48 void _spawnUriNotify(obj, String token) native "VMService_spawnUriNotify"; 48 void _spawnUriNotify(obj, String token) native "VMService_spawnUriNotify";
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698