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
9951638f
Unverified
Commit
9951638f
authored
Oct 23, 2020
by
Dan Field
Committed by
GitHub
Oct 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
retry getting the main isolate (#68894)
parent
ec0a7574
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
vmservice_driver.dart
packages/flutter_driver/lib/src/driver/vmservice_driver.dart
+22
-5
No files found.
packages/flutter_driver/lib/src/driver/vmservice_driver.dart
View file @
9951638f
...
...
@@ -96,11 +96,28 @@ class VMServiceFlutterDriver extends FlutterDriver {
final
VMServiceClientConnection
connection
=
await
vmServiceConnectFunction
(
dartVmServiceUrl
,
headers:
headers
);
final
VMServiceClient
client
=
connection
.
client
;
final
VM
vm
=
await
client
.
getVM
();
final
VMIsolateRef
isolateRef
=
isolateNumber
==
null
?
vm
.
isolates
.
first
:
vm
.
isolates
.
firstWhere
(
(
VMIsolateRef
isolate
)
=>
isolate
.
number
==
isolateNumber
);
Future
<
VMIsolateRef
>
_waitForRootIsolate
()
async
{
bool
_checkIsolate
(
VMIsolateRef
ref
)
=>
ref
.
number
==
isolateNumber
;
while
(
true
)
{
final
VM
vm
=
await
client
.
getVM
();
if
(
vm
.
isolates
.
isEmpty
||
(
isolateNumber
!=
null
&&
!
vm
.
isolates
.
any
(
_checkIsolate
)))
{
await
Future
<
void
>.
delayed
(
_kPauseBetweenReconnectAttempts
);
continue
;
}
return
isolateNumber
==
null
?
vm
.
isolates
.
first
:
vm
.
isolates
.
firstWhere
(
_checkIsolate
);
}
}
final
VMIsolateRef
isolateRef
=
await
_warnIfSlow
<
VMIsolateRef
>(
future:
_waitForRootIsolate
(),
timeout:
kUnusuallyLongTimeout
,
message:
isolateNumber
==
null
?
'The root isolate is taking an unuusally long time to start.'
:
'Isolate
$isolateNumber
is taking an unusually long time to start.'
,
);
_log
(
'Isolate found with number:
${isolateRef.number}
'
);
VMIsolate
isolate
=
await
isolateRef
.
loadRunnable
();
...
...
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