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

Unified Diff: frog/corejs.dart

Issue 8591033: Support globals in frog isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: john comments Created 9 years, 1 month 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 | « no previous file | frog/evaluator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/corejs.dart
diff --git a/frog/corejs.dart b/frog/corejs.dart
index 8f83e22e875a2affc37e9f6929eea23d0a2b4486..5fe74d433586f46a6ef7954dcf7385448e4e06f6 100644
--- a/frog/corejs.dart
+++ b/frog/corejs.dart
@@ -397,10 +397,10 @@ Array.prototype.$setindex = function(i, value) { return this[i] = value; }""");
// Wrap a 0-arg dom-callback to bind it with the current isolate:
function $wrap_call$0(fn) { return fn && fn.wrap$call$0(); }
Function.prototype.wrap$call$0 = function() {
- var isolate = $globalState.currentIsolate;
+ var isolateContext = $globalState.currentContext;
var self = this;
this.wrap$0 = function() {
- isolate.eval(self);
+ isolateContext.eval(self);
$globalState.topEventLoop.run();
};
this.wrap$call$0 = function() { return this.wrap$0; };
@@ -412,10 +412,10 @@ Function.prototype.wrap$call$0 = function() {
// Wrap a 1-arg dom-callback to bind it with the current isolate:
function $wrap_call$1(fn) { return fn && fn.wrap$call$1(); }
Function.prototype.wrap$call$1 = function() {
- var isolate = $globalState.currentIsolate;
+ var isolateContext = $globalState.currentContext;
var self = this;
this.wrap$1 = function(arg) {
- isolate.eval(function() { self(arg); });
+ isolateContext.eval(function() { self(arg); });
$globalState.topEventLoop.run();
};
this.wrap$call$1 = function() { return this.wrap$1; };
@@ -424,6 +424,7 @@ Function.prototype.wrap$call$1 = function() {
}
w.writeln(@"""
var $globalThis = this;
+var $globals = null;
var $globalState = null;""");
} else {
if (useWrap0) {
« no previous file with comments | « no previous file | frog/evaluator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698