Commit dd52b7c5 authored by John McCutchan's avatar John McCutchan Committed by GitHub

Use Chain.capture instead of RunZoned (#6420)

parent 28384787
......@@ -7,6 +7,7 @@ import 'dart:convert';
import 'dart:io';
import 'package:path/path.dart' as path;
import 'package:stack_trace/stack_trace.dart';
import 'application_package.dart';
import 'asset.dart';
......@@ -145,7 +146,7 @@ class HotRunner extends ResidentRunner {
bool shouldBuild: true
}) {
// Don't let uncaught errors kill the process.
return runZoned(() {
return Chain.capture(() {
return _run(
connectionInfoCompleter: connectionInfoCompleter,
route: route,
......
......@@ -5,6 +5,8 @@
import 'dart:async';
import 'dart:io';
import 'package:stack_trace/stack_trace.dart';
import 'application_package.dart';
import 'base/logger.dart';
import 'base/utils.dart';
......@@ -47,7 +49,7 @@ class RunAndStayResident extends ResidentRunner {
bool shouldBuild: true
}) {
// Don't let uncaught errors kill the process.
return runZoned(() {
return Chain.capture(() {
assert(shouldBuild == !prebuiltMode);
return _run(
traceStartup: traceStartup,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment