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

Unified Diff: lib/runtime/dart/_js_helper.js

Issue 1088943006: implement tear offs (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
Index: lib/runtime/dart/_js_helper.js
diff --git a/lib/runtime/dart/_js_helper.js b/lib/runtime/dart/_js_helper.js
index 86b9ae249eab40c3b2247fbdf8ecbebc51a6d331..31847338c5a713f9236506fc08bff9e9ace628a1 100644
--- a/lib/runtime/dart/_js_helper.js
+++ b/lib/runtime/dart/_js_helper.js
@@ -2632,7 +2632,7 @@ var _js_helper;
};
}(functionType);
} else if (!dart.notNull(isStatic) && typeof functionType == "function") {
- let getReceiver = isIntercepted ? _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.receiverOf) : _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.selfOf);
+ let getReceiver = isIntercepted ? _foreign_helper.RAW_DART_FUNCTION_REF(dart.bind(BoundClosure, 'receiverOf')) : _foreign_helper.RAW_DART_FUNCTION_REF(dart.bind(BoundClosure, 'selfOf'));
signatureFunction = function(f, r) {
return function() {
return f.apply({$receiver: r(this)}, arguments$);
@@ -2654,7 +2654,7 @@ var _js_helper;
return constructor;
}
static cspForwardCall(arity, isSuperCall, stubName, func) {
- let getSelf = _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.selfOf);
+ let getSelf = _foreign_helper.RAW_DART_FUNCTION_REF(dart.bind(BoundClosure, 'selfOf'));
if (isSuperCall)
arity = -1;
switch (arity) {
@@ -2745,8 +2745,8 @@ var _js_helper;
})()}` + '}')();
}
static cspForwardInterceptedCall(arity, isSuperCall, name, func) {
- let getSelf = _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.selfOf);
- let getReceiver = _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.receiverOf);
+ let getSelf = _foreign_helper.RAW_DART_FUNCTION_REF(dart.bind(BoundClosure, 'selfOf'));
+ let getReceiver = _foreign_helper.RAW_DART_FUNCTION_REF(dart.bind(BoundClosure, 'receiverOf'));
if (isSuperCall)
arity = -1;
switch (arity) {

Powered by Google App Engine
This is Rietveld 408576698