Skip to content

Commit e907ebb

Browse files
committed
Fixes #408
This is a bug on JSON.decode. This should match the hand fix in #404. [email protected] Review URL: https://codereview.chromium.org/1579223002 .
1 parent 6e8375e commit e907ebb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pkg/dev_compiler/lib/runtime/dart/convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ dart_library.library('dart/convert', null, /* Imports */[
10501050
if (!(typeof source == 'string')) dart.throw(new core.ArgumentError(source));
10511051
let parsed = null;
10521052
try {
1053-
parsed = JSON.parse(source);
1053+
parsed = dart.global.JSON.parse(source);
10541054
} catch (e) {
10551055
dart.throw(new core.FormatException(String(e)));
10561056
}

pkg/dev_compiler/test/codegen/expect/collection/src/unmodifiable_wrappers.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Messages from compiling unmodifiable_wrappers.dart
2-
severe: [AnalyzerMessage] Missing concrete implementation of 'Iterable.map' and 'Iterable.expand' (package:collection/src/unmodifiable_wrappers.dart, line 33, col 7)
3-
severe: [AnalyzerMessage] Missing concrete implementation of 'Iterable.expand' and 'Iterable.map' (package:collection/src/unmodifiable_wrappers.dart, line 136, col 7)
2+
severe: [AnalyzerMessage] Missing concrete implementation of 'Iterable.expand' and 'Iterable.map' (package:collection/src/unmodifiable_wrappers.dart, line 33, col 7)
3+
severe: [AnalyzerMessage] Missing concrete implementation of 'Iterable.map' and 'Iterable.expand' (package:collection/src/unmodifiable_wrappers.dart, line 136, col 7)
44
warning: [DOWN_CAST_COMPOSITE] _throw() (dynamic) will need runtime check to cast to type E (package:collection/src/unmodifiable_wrappers.dart, line 88, col 28)
55
warning: [DOWN_CAST_COMPOSITE] _throw() (dynamic) will need runtime check to cast to type E (package:collection/src/unmodifiable_wrappers.dart, line 94, col 21)
66
warning: [DOWN_CAST_COMPOSITE] _throw() (dynamic) will need runtime check to cast to type V (package:collection/src/unmodifiable_wrappers.dart, line 218, col 41)

pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ _parseJson(String source, reviver(key, value)) {
3333
var parsed;
3434
try {
3535
parsed = JS('=Object|JSExtendableArray|Null|bool|num|String',
36-
'JSON.parse(#)',
36+
'dart.global.JSON.parse(#)',
3737
source);
3838
} catch (e) {
3939
throw new FormatException(JS('String', 'String(#)', e));

0 commit comments

Comments
 (0)