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

Unified Diff: lib/runtime/dart/convert.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
« 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 7b363ec8269c45b4ddd2968e41b81372a74ad2f2..a7df887a5a5fee2dd9c1198ecb23405c2c801234 100644
--- a/lib/runtime/dart/convert.js
+++ b/lib/runtime/dart/convert.js
@@ -818,7 +818,7 @@ var convert;
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]);
+ _JsonUtf8Stringifier.stringify(object, this[_indent], dart.as(this[_toEncodable$], dart.functionType(dart.dynamic, [core.Object])), this[_bufferSize], this[_addChunk].bind(this));
this[_sink].close();
}
close() {
@@ -1375,7 +1375,7 @@ var convert;
}
convert(data) {
let lines = new (core.List$(core.String))();
- _LineSplitterSink[_addSlice](data, 0, data.length, true, lines[core.$add]);
+ _LineSplitterSink[_addSlice](data, 0, data.length, true, lines[core.$add].bind(lines));
return lines;
}
startChunkedConversion(sink) {
@@ -1400,7 +1400,7 @@ var convert;
end = chunk.length;
this[_carry] = null;
}
- this[_carry] = _LineSplitterSink[_addSlice](chunk, start, end, isLast, this[_sink].add);
+ this[_carry] = _LineSplitterSink[_addSlice](chunk, start, end, isLast, this[_sink].add.bind(this[_sink]));
if (isLast)
this[_sink].close();
}
@@ -1576,7 +1576,7 @@ var convert;
return new _Utf8StringSinkAdapter(this, this[_stringSink], allowMalformed);
}
asStringSink() {
- return new ClosableStringSink.fromStringSink(this[_stringSink], this.close);
+ return new ClosableStringSink.fromStringSink(this[_stringSink], dart.bind(this, 'close'));
Jacob 2015/04/21 20:27:56 I don't get why this case is dart.bind(this, 'clos
Jennifer Messerly 2015/04/21 21:11:06 Hmmm. The stateless checker may only work for iden
}
}
class _StringCallbackSink extends _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