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

Unified Diff: runtime/observatory/lib/utils.dart

Issue 1126363005: Show tooltip with local variable value in Observatory debugger (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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/observatory/lib/src/service/object.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/utils.dart
diff --git a/runtime/observatory/lib/utils.dart b/runtime/observatory/lib/utils.dart
index 522a11edda9893b00eda8977395cf00c9803f92e..c696529c750b20bfcc1e09bf1d15131c2ab5018b 100644
--- a/runtime/observatory/lib/utils.dart
+++ b/runtime/observatory/lib/utils.dart
@@ -4,6 +4,7 @@
library utils;
+import 'dart:async';
import 'dart:math';
class Utils {
@@ -140,3 +141,24 @@ class Utils {
static bool runningInJavaScript() => identical(1.0, 1);
}
+
+/// A [Task] that can be scheduled on the Dart event queue.
+class Task {
+ Timer _timer;
+ final Function callback;
+
+ Task(this.callback);
+
+ /// Queue [this] to run on the next Dart event queue pump. Does nothing
+ /// if [this] is already queued.
+ queue() {
+ if (_timer != null) {
+ // Already scheduled.
+ return;
+ }
+ _timer = new Timer(Duration.ZERO, () {
+ _timer = null;
+ callback();
+ });
+ }
+}
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698