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

Unified Diff: runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart

Issue 100103011: Changes to support dprof and Observatory profiler UIs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 12 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
Index: runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart b/runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart
index e83c925947ef58579db493233f0b14d078dc7b23..115e361a32c9b0b09ae1e525cc66d00597b30b19 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/location_manager.dart
@@ -11,10 +11,13 @@ class LocationManager extends Observable {
static const int InvalidIsolateId = 0;
static const String defaultHash = '#/isolates/';
static final RegExp currentIsolateMatcher = new RegExp(r"#/isolates/\d+");
+ static final RegExp currentIsolateProfileMatcher =
+ new RegExp(r'#/isolates/\d+/profile');
ObservatoryApplication _application;
ObservatoryApplication get application => _application;
+ @observable bool profile = false;
@observable String currentHash = '';
@observable Uri currentHashUri;
void init() {
@@ -77,7 +80,12 @@ class LocationManager extends Observable {
// Chomp off the #
String requestUrl = currentHash.substring(1);
currentHashUri = Uri.parse(requestUrl);
- application.requestManager.get(requestUrl);
+ if (currentIsolateProfileMatcher.hasMatch(currentHash)) {
+ // We do not automatically fetch profile data.
+ profile = true;
+ } else {
+ application.requestManager.get(requestUrl);
+ }
}
/// Create a request for [l] on the current isolate.

Powered by Google App Engine
This is Rietveld 408576698