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
18aed70e
Commit
18aed70e
authored
Mar 31, 2016
by
Yegor Jbanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[driver] switch to different pause event workaround
parent
db9a92e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
driver.dart
packages/flutter_driver/lib/src/driver.dart
+12
-8
No files found.
packages/flutter_driver/lib/src/driver.dart
View file @
18aed70e
...
...
@@ -50,15 +50,19 @@ class FlutterDriver {
_log
.
trace
(
'Looking for the isolate'
);
VMIsolate
isolate
=
await
vm
.
isolates
.
first
.
loadRunnable
();
// TODO(yjbanov): for a very brief moment the isolate could report that it
// is resumed, right before it goes into "paused on start" state. There's no
// robust way to deal with it other than waiting and querying for the
// isolate data again. 300 millis should be sufficient as the isolate is in
// the runnable state (i.e. it loaded and parsed all the Dart code) and
// going from here to the `main()` method should be trivial.
// TODO(yjbanov): vm_service_client does not support "None" pause event yet.
// It is currently reported as `null`, but we cannot rely on it because
// eventually the event will be reported as a non-`null` object. For now,
// list all the events we know about. Later we'll check for "None" event
// explicitly.
//
// See: https://github.com/dart-lang/sdk/issues/25902
if
(
isolate
.
pauseEvent
is
VMResumeEvent
)
{
// See: https://github.com/dart-lang/vm_service_client/issues/4
if
(
isolate
.
pauseEvent
is
!
VMPauseStartEvent
&&
isolate
.
pauseEvent
is
!
VMPauseExitEvent
&&
isolate
.
pauseEvent
is
!
VMPauseBreakpointEvent
&&
isolate
.
pauseEvent
is
!
VMPauseExceptionEvent
&&
isolate
.
pauseEvent
is
!
VMPauseInterruptedEvent
&&
isolate
.
pauseEvent
is
!
VMResumeEvent
)
{
await
new
Future
<
Null
>.
delayed
(
new
Duration
(
milliseconds:
300
));
isolate
=
await
vm
.
isolates
.
first
.
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