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
c663cd55
Unverified
Commit
c663cd55
authored
Apr 07, 2020
by
Jason Simmons
Committed by
GitHub
Apr 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Refresh VM state before executing hot reload (#53960)
parent
cccfe96e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+7
-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
+1
-0
No files found.
packages/flutter_tools/lib/src/resident_runner.dart
View file @
c663cd55
...
...
@@ -825,6 +825,13 @@ abstract class ResidentRunner {
await
Future
.
wait
(
futures
);
}
Future
<
void
>
refreshVM
()
async
{
final
List
<
Future
<
void
>>
futures
=
<
Future
<
void
>>[
for
(
final
FlutterDevice
device
in
flutterDevices
)
device
.
getVMs
(),
];
await
Future
.
wait
(
futures
);
}
Future
<
void
>
debugDumpApp
()
async
{
await
refreshViews
();
for
(
final
FlutterDevice
device
in
flutterDevices
)
{
...
...
packages/flutter_tools/lib/src/run_hot.dart
View file @
c663cd55
...
...
@@ -798,6 +798,7 @@ class HotRunner extends ResidentRunner {
if
(!
_isPaused
())
{
globals
.
printTrace
(
'Refreshing active FlutterViews before reloading.'
);
await
refreshVM
();
await
refreshViews
();
}
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
c663cd55
...
...
@@ -111,6 +111,7 @@ void main() {
});
when
(
mockFlutterDevice
.
vmService
).
thenReturn
(
mockVMService
);
when
(
mockFlutterDevice
.
refreshViews
()).
thenAnswer
((
Invocation
invocation
)
async
{
});
when
(
mockFlutterDevice
.
getVMs
()).
thenAnswer
((
Invocation
invocation
)
async
{
});
when
(
mockFlutterDevice
.
reloadSources
(
any
,
pause:
anyNamed
(
'pause'
))).
thenReturn
(<
Future
<
Map
<
String
,
dynamic
>>>[
Future
<
Map
<
String
,
dynamic
>>.
value
(<
String
,
dynamic
>{
'type'
:
'ReloadReport'
,
...
...
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