Pass --enable_mirrors=false when building script snapshots for the debug mode. (#12472)

The initial loading happens on the host, which was building a script snapshot and allowing imports of dart:mirrors. Hot reload happens on the device, which then notices the imports and issues a compile-time error. This change causes programs with imports of dart:mirrors to be rejected during the initial load.

Fixes https://github.com/flutter/flutter/issues/12440
This commit is contained in:
Ryan Macnak
2017-10-12 14:46:37 -07:00
committed by GitHub
parent c312b3d9ae
commit a4b29d6414

View File

@@ -167,6 +167,7 @@ class Snapshotter {
final List<String> args = <String>[
'--snapshot_kind=script',
'--script_snapshot=$snapshotPath',
'--enable-mirrors=false',
mainPath,
];