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

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: '' 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
Index: frog/corejs.dart
diff --git a/frog/corejs.dart b/frog/corejs.dart
index 3a1df8e7551acbf73a4465a68a9745035b195d72..7a0deddff049150f35fcefc27122373a46b7a988 100644
--- a/frog/corejs.dart
+++ b/frog/corejs.dart
@@ -395,10 +395,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; };
@@ -410,10 +410,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; };
@@ -422,6 +422,7 @@ Function.prototype.wrap$call$1 = function() {
}
w.writeln(@"""
var $globalThis = this;
+var $globals = null;
var $globalState = null;""");
} else {
if (useWrap0) {

Powered by Google App Engine
This is Rietveld 408576698