Do not show an assertion failure if Dart_FinalizeLoading returns an error while building a snapshot (flutter/engine#2584)

This might happen due to errors expected during development (e.g. a mistyped

Dart class name)
This commit is contained in:
Jason Simmons 2016-04-07 12:33:21 -07:00
parent c1b21af2c5
commit a1ebcdeb94

View File

@ -89,7 +89,8 @@ int main(int argc, const char* argv[]) {
CHECK(args.size() == 1);
LoadScript(args[0]);
CHECK(!LogIfError(Dart_FinalizeLoading(true)));
if (LogIfError(Dart_FinalizeLoading(true)))
return 1;
CHECK(command_line.HasSwitch(switches::kSnapshot));
WriteSnapshot(command_line.GetSwitchValuePath(switches::kSnapshot));