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

Unified Diff: sdk/lib/vmservice/asset.dart

Issue 1640773005: Make it possible to share the embedder's dart sources for the vmservice (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/service_isolate.cc ('k') | sdk/lib/vmservice/vmservice.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/vmservice/asset.dart
diff --git a/sdk/lib/vmservice/asset.dart b/sdk/lib/vmservice/asset.dart
index 8155e8a8cea7558bdcfa882f04265bfbf81d0cdf..b8f6c207f94dd431d232f2c2f5c4d0fd617afb24 100644
--- a/sdk/lib/vmservice/asset.dart
+++ b/sdk/lib/vmservice/asset.dart
@@ -59,6 +59,17 @@ class Asset {
String toString() => '$name ($mimeType)';
}
+HashMap<String, Asset> _assets;
+HashMap<String, Asset> get assets {
+ if (_assets == null) {
+ try {
+ _assets = Asset.request();
+ } catch (e) {
+ print('Could not load Observatory assets: $e');
+ }
+ }
+ return _assets;
+}
class _ByteStream {
final Uint8List bytes;
« no previous file with comments | « runtime/vm/service_isolate.cc ('k') | sdk/lib/vmservice/vmservice.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698