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

Unified Diff: lib/isolate/frog/natives.js

Issue 10264021: Fix codegen and isolate issues for frog dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 | « frog/world.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/isolate/frog/natives.js
diff --git a/lib/isolate/frog/natives.js b/lib/isolate/frog/natives.js
index 2808ecb2cc9aeaa989dd5e06d30d8e2bdb3e8e1c..06072bf65a02d436f41710541828e3d2fddcd161 100644
--- a/lib/isolate/frog/natives.js
+++ b/lib/isolate/frog/natives.js
@@ -44,6 +44,21 @@ Function.prototype.wrap$call$1 = function() {
return this.wrap$1;
};
+// Wrap a 2-arg dom-callback to bind it with the current isolate:
+function $wrap_call$2(fn) { return fn && fn.wrap$call$2(); }
+
+Function.prototype.wrap$call$2 = function() {
+ var isolateContext = $globalState.currentContext;
+ var self = this;
+ this.wrap$2 = function(arg1, arg2) {
+ var res = isolateContext.eval(function() { return self(arg1, arg2); });
+ $globalState.topEventLoop.run();
+ return res;
+ };
+ this.wrap$call$2 = function() { return this.wrap$2; };
+ return this.wrap$2;
+};
+
$thisScriptUrl = (function () {
if (!$supportsWorkers || $isWorker) return (void 0);
« no previous file with comments | « frog/world.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698