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
91128238
Commit
91128238
authored
Oct 20, 2016
by
John McCutchan
Committed by
GitHub
Oct 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not reassemble the application after a hot reload if the isolate is paused (#6370)
parent
c0742652
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
hot.dart
packages/flutter_tools/lib/src/hot.dart
+10
-1
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+5
-1
No files found.
packages/flutter_tools/lib/src/hot.dart
View file @
91128238
...
...
@@ -493,6 +493,15 @@ class HotRunner extends ResidentRunner {
printError
(
'Hot reload failed:
\n
code =
$errorCode
\n
message =
$errorMessage
\n
$st
'
);
return
false
;
}
// Reload the isolate.
await
currentView
.
uiIsolate
.
reload
();
// Check if the isolate is paused.
final
ServiceEvent
pauseEvent
=
currentView
.
uiIsolate
.
pauseEvent
;
if
((
pauseEvent
!=
null
)
&&
(
pauseEvent
.
isPauseEvent
))
{
// Isolate is paused. Stop here.
printTrace
(
'Skipping reassemble because isolate is paused.'
);
return
true
;
}
await
_evictDirtyAssets
();
printTrace
(
'Reassembling application'
);
bool
waitForFrame
=
true
;
...
...
@@ -510,7 +519,7 @@ class HotRunner extends ResidentRunner {
}
if
(
waitForFrame
)
{
// When the framework is present, we can wait for the first frame
// event and measure reload
it
me.
// event and measure reload
ti
me.
await
firstFrameTimer
.
firstFrame
();
printStatus
(
'Hot reload performed in '
'
${getElapsedAsMilliseconds(firstFrameTimer.elapsed)}
.'
);
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
91128238
...
...
@@ -332,6 +332,7 @@ class ServiceEvent extends ServiceObject {
static
const
String
kPauseBreakpoint
=
'PauseBreakpoint'
;
static
const
String
kPauseInterrupted
=
'PauseInterrupted'
;
static
const
String
kPauseException
=
'PauseException'
;
static
const
String
kPausePostRequest
=
'PausePostRequest'
;
static
const
String
kNone
=
'None'
;
static
const
String
kResume
=
'Resume'
;
static
const
String
kBreakpointAdded
=
'BreakpointAdded'
;
...
...
@@ -379,6 +380,7 @@ class ServiceEvent extends ServiceObject {
kind
==
kPauseBreakpoint
||
kind
==
kPauseInterrupted
||
kind
==
kPauseException
||
kind
==
kPausePostRequest
||
kind
==
kNone
);
}
}
...
...
@@ -680,6 +682,7 @@ class Isolate extends ServiceObjectOwner {
Isolate
get
isolate
=>
this
;
DateTime
startTime
;
ServiceEvent
pauseEvent
;
final
Map
<
String
,
ServiceObject
>
_cache
=
new
Map
<
String
,
ServiceObject
>();
...
...
@@ -744,8 +747,9 @@ class Isolate extends ServiceObjectOwner {
int
startTimeMillis
=
map
[
'startTime'
];
startTime
=
new
DateTime
.
fromMillisecondsSinceEpoch
(
startTimeMillis
);
// TODO(johnmccutchan): Extract any properties we care about here.
_upgradeCollection
(
map
,
this
);
pauseEvent
=
map
[
'pauseEvent'
];
}
static
final
int
kIsolateReloadBarred
=
1005
;
...
...
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