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
011a9026
Commit
011a9026
authored
Mar 06, 2017
by
Todd Volkert
Committed by
GitHub
Mar 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create and use a STILL_RECORDING shutdown stage (#8588)
parent
b7f00a64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
application_package.dart
packages/flutter_tools/lib/src/application_package.dart
+3
-1
process.dart
packages/flutter_tools/lib/src/base/process.dart
+7
-3
No files found.
packages/flutter_tools/lib/src/application_package.dart
View file @
011a9026
...
...
@@ -147,7 +147,9 @@ abstract class IOSApp extends ApplicationPackage {
Directory
bundleDir
;
try
{
final
Directory
tempDir
=
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_app_'
);
addShutdownHook
(()
async
=>
await
tempDir
.
delete
(
recursive:
true
));
addShutdownHook
(()
async
{
await
tempDir
.
delete
(
recursive:
true
);
},
ShutdownStage
.
STILL_RECORDING
);
os
.
unzip
(
fs
.
file
(
applicationBinary
),
tempDir
);
final
Directory
payloadDir
=
fs
.
directory
(
fs
.
path
.
join
(
tempDir
.
path
,
'Payload'
));
bundleDir
=
payloadDir
.
listSync
().
singleWhere
(
_isBundleDirectory
);
...
...
packages/flutter_tools/lib/src/base/process.dart
View file @
011a9026
...
...
@@ -26,17 +26,21 @@ class ShutdownStage implements Comparable<ShutdownStage> {
/// The stage priority. Smaller values will be run before larger values.
final
int
_priority
;
/// The stage before the invocation recording (if one exists) is serialized
/// to disk. Tasks performed during this stage *will* be recorded.
static
const
ShutdownStage
STILL_RECORDING
=
const
ShutdownStage
.
_
(
1
);
/// The stage during which the invocation recording (if one exists) will be
/// serialized to disk. Invocations performed after this stage will not be
/// recorded.
static
const
ShutdownStage
SERIALIZE_RECORDING
=
const
ShutdownStage
.
_
(
1
);
static
const
ShutdownStage
SERIALIZE_RECORDING
=
const
ShutdownStage
.
_
(
2
);
/// The stage during which a serialized recording will be refined (e.g.
/// cleansed for tests, zipped up for bug reporting purposes, etc.).
static
const
ShutdownStage
POST_PROCESS_RECORDING
=
const
ShutdownStage
.
_
(
2
);
static
const
ShutdownStage
POST_PROCESS_RECORDING
=
const
ShutdownStage
.
_
(
3
);
/// The stage during which temporary files and directories will be deleted.
static
const
ShutdownStage
CLEANUP
=
const
ShutdownStage
.
_
(
3
);
static
const
ShutdownStage
CLEANUP
=
const
ShutdownStage
.
_
(
4
);
@override
int
compareTo
(
ShutdownStage
other
)
=>
_priority
.
compareTo
(
other
.
_priority
);
...
...
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