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

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

Issue 1131143002: Angular workarounds (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase on latest 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
Index: lib/runtime/dart/convert.js
diff --git a/lib/runtime/dart/convert.js b/lib/runtime/dart/convert.js
index 3b3abc3bf0ee9e316c962e123a8dd2952e36f4ba..a3c2b953eefdba5586ad5cc354cb2ec4cdf9119d 100644
--- a/lib/runtime/dart/convert.js
+++ b/lib/runtime/dart/convert.js
@@ -1,7 +1,7 @@
var convert = dart.defineLibrary(convert, {});
var core = dart.import(core);
-var async = dart.lazyImport(async);
-var typed_data = dart.lazyImport(typed_data);
+var async = dart.import(async);
+var typed_data = dart.import(typed_data);
var _internal = dart.import(_internal);
var collection = dart.import(collection);
(function(exports, core, async, typed_data, _internal, collection) {
@@ -519,9 +519,20 @@ var collection = dart.import(collection);
}
}
dart.defineNamedConstructor(HtmlEscapeMode, '_');
- HtmlEscapeMode.UNKNOWN = dart.const(new HtmlEscapeMode._('unknown', true, true, true, true));
- HtmlEscapeMode.ATTRIBUTE = dart.const(new HtmlEscapeMode._('attribute', false, true, false, false));
- HtmlEscapeMode.ELEMENT = dart.const(new HtmlEscapeMode._('element', true, false, false, true));
+ dart.defineLazyProperties(HtmlEscapeMode, {
+ get UNKNOWN() {
+ return dart.const(new HtmlEscapeMode._('unknown', true, true, true, true));
+ },
+ set UNKNOWN(_) {},
+ get ATTRIBUTE() {
+ return dart.const(new HtmlEscapeMode._('attribute', false, true, false, false));
+ },
+ set ATTRIBUTE(_) {},
+ get ELEMENT() {
+ return dart.const(new HtmlEscapeMode._('element', true, false, false, true));
+ },
+ set ELEMENT(_) {}
+ });
let _convert = Symbol('_convert');
class HtmlEscape extends Converter$(core.String, core.String) {
HtmlEscape(mode) {
@@ -537,7 +548,7 @@ var collection = dart.import(collection);
[_convert](text, start, end) {
let result = null;
for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
- let ch = core.String.get(text, i);
+ let ch = text.get(i);
let replace = null;
switch (ch) {
case '&':
@@ -2130,7 +2141,12 @@ var collection = dart.import(collection);
}
}
}
- _Utf8Decoder._LIMITS = dart.const(dart.setType([_ONE_BYTE_LIMIT, _TWO_BYTE_LIMIT, _THREE_BYTE_LIMIT, _FOUR_BYTE_LIMIT], core.List$(core.int)));
+ dart.defineLazyProperties(_Utf8Decoder, {
+ get _LIMITS() {
+ return dart.const(dart.setType([_ONE_BYTE_LIMIT, _TWO_BYTE_LIMIT, _THREE_BYTE_LIMIT, _FOUR_BYTE_LIMIT], core.List$(core.int)));
+ },
+ set _LIMITS(_) {}
+ });
let _processed = Symbol('_processed');
let _computeKeys = Symbol('_computeKeys');
let _original = Symbol('_original');

Powered by Google App Engine
This is Rietveld 408576698