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

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

Issue 1052383003: Disable closure wrapping by default (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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/convert.js
diff --git a/lib/runtime/dart/convert.js b/lib/runtime/dart/convert.js
index 4d7a5d05544081e833deded9d46515074a107ff7..f0ed0957d20db751d04f64c467e5d8d4bc5fb9b0 100644
--- a/lib/runtime/dart/convert.js
+++ b/lib/runtime/dart/convert.js
@@ -659,12 +659,12 @@ var convert;
toEncodable = this[_toEncodable$];
if (toEncodable == null)
return this.encoder.convert(value);
- return new JsonEncoder(dart.closureWrap(toEncodable, "(Object) → Object")).convert(value);
+ return new JsonEncoder(dart.as(toEncodable, dart.throw_("Unimplemented type (Object) → Object"))).convert(value);
}
get encoder() {
if (this[_toEncodable$] == null)
return new JsonEncoder();
- return new JsonEncoder(dart.closureWrap(this[_toEncodable$], "(Object) → Object"));
+ return new JsonEncoder(dart.as(this[_toEncodable$], dart.throw_("Unimplemented type (Object) → Object")));
}
get decoder() {
if (this[_reviver] == null)
@@ -1018,13 +1018,13 @@ var convert;
writeMap(map) {
this.writeString('{');
let separator = '"';
- map.forEach(dart.closureWrap(((key, value) => {
+ map.forEach(dart.as(((key, value) => {
this.writeString(separator);
separator = ',"';
this.writeStringContent(key);
this.writeString('":');
this.writeObject(value);
- }).bind(this), "(String, Object) → void"));
+ }).bind(this), dart.throw_("Unimplemented type (String, Object) → void")));
this.writeString('}');
}
}

Powered by Google App Engine
This is Rietveld 408576698