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

Unified Diff: runtime/lib/timer_impl.dart

Issue 892963002: Reduce timer stack overhead by getting immediate callback and run it, instead of calling through fu… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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/lib/isolate_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/timer_impl.dart
diff --git a/runtime/lib/timer_impl.dart b/runtime/lib/timer_impl.dart
index 4df37cd87748313744415dd28ccdafa474872f30..2c5674572d7a9e2509c65bfadf9b6e93caeb0cc5 100644
--- a/runtime/lib/timer_impl.dart
+++ b/runtime/lib/timer_impl.dart
@@ -396,7 +396,10 @@ class _Timer implements Timer {
timer._addTimerToHeap();
}
// Execute pending micro tasks.
- _runPendingImmediateCallback();
+ var immediateCallback = _removePendingImmediateCallback();
+ if (immediateCallback != null) {
+ immediateCallback();
+ }
}
}
} finally {
« no previous file with comments | « runtime/lib/isolate_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698