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
62171dfe
Unverified
Commit
62171dfe
authored
Mar 16, 2023
by
Anna Gringauze
Committed by
GitHub
Mar 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix hot restart flake (#122776)
parent
96f927fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+4
-1
hot_reload_web_test.dart
...ges/flutter_tools/test/web.shard/hot_reload_web_test.dart
+14
-0
No files found.
packages/flutter_tools/lib/src/vmservice.dart
View file @
62171dfe
...
...
@@ -1019,7 +1019,10 @@ class FlutterVmService {
onError:
(
Object
?
error
,
StackTrace
stackTrace
)
{
if
(
error
is
vm_service
.
SentinelException
||
error
==
null
||
(
error
is
vm_service
.
RPCError
&&
error
.
code
==
RPCErrorCodes
.
kServiceDisappeared
))
{
error
is
vm_service
.
RPCError
&&
(
error
.
code
==
RPCErrorCodes
.
kServiceDisappeared
||
error
.
code
==
RPCErrorCodes
.
kInternalError
&&
error
.
message
.
contains
(
'Sentinel kind: Collected'
)))
{
return
null
;
}
return
Future
<
vm_service
.
Isolate
?>.
error
(
error
,
stackTrace
);
...
...
packages/flutter_tools/test/web.shard/hot_reload_web_test.dart
View file @
62171dfe
...
...
@@ -45,6 +45,20 @@ Future<void> _testProject(HotReloadProject project, {String name = 'Default'}) a
await
flutter
.
hotRestart
();
});
testWithoutContext
(
'
$testName
: hot restart works without error after delay'
,
()
async
{
flutter
.
stdout
.
listen
(
printOnFailure
);
await
flutter
.
run
(
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
200
));
await
flutter
.
hotRestart
();
});
testWithoutContext
(
'
$testName
: multiple hot restarts work without error'
,
()
async
{
flutter
.
stdout
.
listen
(
printOnFailure
);
await
flutter
.
run
(
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
200
));
await
Future
.
wait
(<
Future
<
void
>>[
flutter
.
hotRestart
(),
flutter
.
hotRestart
()]);
});
testWithoutContext
(
'
$testName
: newly added code executes during hot restart'
,
()
async
{
final
Completer
<
void
>
completer
=
Completer
<
void
>();
final
StreamSubscription
<
String
>
subscription
=
flutter
.
stdout
.
listen
((
String
line
)
{
...
...
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