mirror of
https://github.com/flutter/flutter
synced 2024-10-14 04:02:56 +00:00
Miscellaneous cleanups (#6813)
- [x] Return the reload message even when paused at a breakpoint. - [x] Only initialize context members if they aren't already initialized.
This commit is contained in:
parent
ca5e1f3f23
commit
f172f0675d
|
@ -82,10 +82,14 @@ Future<Null> main(List<String> args) async {
|
|||
|
||||
return Chain.capture/*<Future<Null>>*/(() async {
|
||||
// Initialize globals.
|
||||
context[Logger] = new StdoutLogger();
|
||||
context[DeviceManager] = new DeviceManager();
|
||||
context[DevFSConfig] = new DevFSConfig();
|
||||
Doctor.initGlobal();
|
||||
if (context[Logger] == null)
|
||||
context[Logger] = new StdoutLogger();
|
||||
if (context[DeviceManager] == null)
|
||||
context[DeviceManager] = new DeviceManager();
|
||||
if (context[DevFSConfig] == null)
|
||||
context[DevFSConfig] = new DevFSConfig();
|
||||
if (context[Doctor] == null)
|
||||
context[Doctor] = new Doctor();
|
||||
|
||||
dynamic result = await runner.run(args);
|
||||
_exit(result is int ? result : 1);
|
||||
|
|
|
@ -9,7 +9,6 @@ import 'package:path/path.dart' as path;
|
|||
|
||||
import 'android/android_workflow.dart';
|
||||
import 'base/common.dart';
|
||||
import 'base/context.dart';
|
||||
import 'device.dart';
|
||||
import 'globals.dart';
|
||||
import 'ios/ios_workflow.dart';
|
||||
|
@ -48,10 +47,6 @@ class Doctor {
|
|||
_validators.add(new DeviceValidator());
|
||||
}
|
||||
|
||||
static void initGlobal() {
|
||||
context[Doctor] = new Doctor();
|
||||
}
|
||||
|
||||
IOSWorkflow _iosWorkflow;
|
||||
AndroidWorkflow _androidWorkflow;
|
||||
|
||||
|
|
|
@ -517,7 +517,7 @@ class HotRunner extends ResidentRunner {
|
|||
if ((pauseEvent != null) && (pauseEvent.isPauseEvent)) {
|
||||
// Isolate is paused. Stop here.
|
||||
printTrace('Skipping reassemble because isolate is paused.');
|
||||
return OperationResult.ok;
|
||||
return new OperationResult(OperationResult.ok.code, reloadMessage);
|
||||
}
|
||||
await _evictDirtyAssets();
|
||||
printTrace('Reassembling application');
|
||||
|
|
Loading…
Reference in a new issue