Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
f94fa278
Unverified
Commit
f94fa278
authored
Apr 18, 2021
by
Jason Simmons
Committed by
GitHub
Apr 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop the DevTools child process if the runner terminates unexpectedly (#80602)
parent
95d7d671
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
resident_devtools_handler.dart
...ages/flutter_tools/lib/src/resident_devtools_handler.dart
+3
-0
run_cold.dart
packages/flutter_tools/lib/src/run_cold.dart
+1
-0
run_hot.dart
packages/flutter_tools/lib/src/run_hot.dart
+1
-0
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+15
-0
No files found.
packages/flutter_tools/lib/src/resident_devtools_handler.dart
View file @
f94fa278
...
...
@@ -208,6 +208,8 @@ NoOpDevtoolsHandler createNoOpHandler(DevtoolsLauncher launcher, ResidentRunner
@visibleForTesting
class
NoOpDevtoolsHandler
implements
ResidentDevtoolsHandler
{
bool
wasShutdown
=
false
;
@override
DevToolsServerAddress
get
activeDevToolsServer
=>
null
;
...
...
@@ -223,6 +225,7 @@ class NoOpDevtoolsHandler implements ResidentDevtoolsHandler {
@override
Future
<
void
>
shutdown
()
async
{
wasShutdown
=
true
;
return
;
}
}
packages/flutter_tools/lib/src/run_cold.dart
View file @
f94fa278
...
...
@@ -204,6 +204,7 @@ class ColdRunner extends ResidentRunner {
await
flutterDevice
.
device
.
dispose
();
}
await
residentDevtoolsHandler
.
shutdown
();
await
stopEchoingDeviceLog
();
}
...
...
packages/flutter_tools/lib/src/run_hot.dart
View file @
f94fa278
...
...
@@ -1163,6 +1163,7 @@ class HotRunner extends ResidentRunner {
await
flutterDevice
.
device
.
dispose
();
}
await
_cleanupDevFS
();
await
residentDevtoolsHandler
.
shutdown
();
await
stopEchoingDeviceLog
();
}
}
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
f94fa278
...
...
@@ -2452,6 +2452,21 @@ void main() {
expect
(
nextPlatform
(
'macOS'
),
'android'
);
expect
(()
=>
nextPlatform
(
'unknown'
),
throwsAssertionError
);
});
testUsingContext
(
'cleanupAtFinish shuts down resident devtools handler'
,
()
=>
testbed
.
run
(()
async
{
residentRunner
=
HotRunner
(
<
FlutterDevice
>[
mockFlutterDevice
,
],
stayResident:
false
,
debuggingOptions:
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
,
vmserviceOutFile:
'foo'
),
target:
'main.dart'
,
devtoolsHandler:
createNoOpHandler
,
);
await
residentRunner
.
cleanupAtFinish
();
expect
((
residentRunner
.
residentDevtoolsHandler
as
NoOpDevtoolsHandler
).
wasShutdown
,
true
);
}));
}
class
MockFlutterDevice
extends
Mock
implements
FlutterDevice
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment