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

Unified Diff: lib/isolate/isolate_leg.dart

Issue 9702074: Add support for capturing and changing the current isolate in the closure wrapper. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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: lib/isolate/isolate_leg.dart
===================================================================
--- lib/isolate/isolate_leg.dart (revision 5637)
+++ lib/isolate/isolate_leg.dart (working copy)
@@ -42,3 +42,17 @@
#source("frog/isolateimpl.dart");
#source("frog/ports.dart");
#source("frog/messages.dart");
+
+/**
+ * Called by the compiler to support switching
+ * between isolates when we get a callback from the DOM.
+ */
+void _callInIsolate(IsolateContext isolate, Function function) {
+ isolate.eval(function);
+ _globalState.topEventLoop.run();
+}
+
+/**
+ * Called by the compiler to fetch the current isolate context.
+ */
+void _currentIsolate() => _globalState.currentContext;

Powered by Google App Engine
This is Rietveld 408576698