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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 1283413002: Fix table cpu profile to work properly with non-dart functions (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/observatory/lib/src/service/object.dart
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 2e6995271c60c6079864d4da5d03477bfc9542ad..3c8e6394b081c47e63d1f38c7d9aec5087b30d1d 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -1114,11 +1114,15 @@ class Isolate extends ServiceObjectOwner with Coverage {
});
}
- Future<ServiceObject> getObject(String objectId) {
+ Future<ServiceObject> getObject(String objectId, {bool reload: true}) {
Cutch 2015/08/13 13:43:13 Not used but I added it while trying something out
assert(objectId != null && objectId != '');
var obj = _cache[objectId];
if (obj != null) {
- return obj.reload();
+ if (reload) {
+ return obj.reload();
+ }
+ // Returned cached object.
+ return new Future.value(obj);
}
Map params = {
'objectId': objectId,
@@ -2386,6 +2390,7 @@ class ServiceFunction extends ServiceObject with Coverage {
@observable ProfileFunction profile;
@observable Instance icDataArray;
+ bool get canCache => true;
bool get immutable => false;
ServiceFunction._empty(ServiceObject owner) : super._empty(owner);

Powered by Google App Engine
This is Rietveld 408576698