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

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

Issue 1142293002: Use dart.tearoff helper at tearoff sites (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Use dart.bind instead of dart.tearoff Created 5 years, 7 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 | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/convert.js
diff --git a/lib/runtime/dart/convert.js b/lib/runtime/dart/convert.js
index df5cfa88b78639ec05fab14400bc63435c95e10e..2002be1eddaccdc82d9393b7f952cf67986abf3c 100644
--- a/lib/runtime/dart/convert.js
+++ b/lib/runtime/dart/convert.js
@@ -998,7 +998,7 @@ var collection = dart.import(collection);
throw new core.StateError("Only one call to add allowed");
}
this[_isDone] = true;
- _JsonUtf8Stringifier.stringify(object, this[_indent], dart.as(this[_toEncodable$], dart.functionType(dart.dynamic, [core.Object])), this[_bufferSize], this[_addChunk].bind(this));
+ _JsonUtf8Stringifier.stringify(object, this[_indent], dart.as(this[_toEncodable$], dart.functionType(dart.dynamic, [core.Object])), this[_bufferSize], dart.bind(this, _addChunk));
this[_sink].close();
}
close() {
@@ -1639,7 +1639,7 @@ var collection = dart.import(collection);
}
convert(data) {
let lines = new (core.List$(core.String))();
- _LineSplitterSink._addSlice(data, 0, data.length, true, lines[core.$add].bind(lines));
+ _LineSplitterSink._addSlice(data, 0, data.length, true, dart.bind(lines, core.$add));
return lines;
}
startChunkedConversion(sink) {
@@ -1668,7 +1668,7 @@ var collection = dart.import(collection);
end = chunk.length;
this[_carry] = null;
}
- this[_carry] = _LineSplitterSink._addSlice(chunk, start, end, isLast, this[_sink].add.bind(this[_sink]));
+ this[_carry] = _LineSplitterSink._addSlice(chunk, start, end, isLast, dart.bind(this[_sink], 'add'));
if (isLast)
this[_sink].close();
}
@@ -1872,7 +1872,7 @@ var collection = dart.import(collection);
return new _Utf8StringSinkAdapter(this, this[_stringSink], allowMalformed);
}
asStringSink() {
- return new ClosableStringSink.fromStringSink(this[_stringSink], this.close.bind(this));
+ return new ClosableStringSink.fromStringSink(this[_stringSink], dart.bind(this, 'close'));
}
}
dart.setSignature(_StringSinkConversionSink, {
« no previous file with comments | « lib/runtime/dart/collection.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698