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
719ea5a8
Unverified
Commit
719ea5a8
authored
Jun 18, 2020
by
Jonah Williams
Committed by
GitHub
Jun 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] make expando on vm service null safe to handle web stuff (#59624)
parent
dbc6dca5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+2
-2
vmservice_test.dart
...ages/flutter_tools/test/general.shard/vmservice_test.dart
+7
-0
No files found.
packages/flutter_tools/lib/src/vmservice.dart
View file @
719ea5a8
...
...
@@ -444,9 +444,9 @@ class FlutterView {
/// Flutter specific VM Service functionality.
extension
FlutterVmService
on
vm_service
.
VmService
{
Uri
get
wsAddress
=>
_wsAddressExpando
[
this
]
;
Uri
get
wsAddress
=>
this
!=
null
?
_wsAddressExpando
[
this
]
:
null
;
Uri
get
httpAddress
=>
_httpAddressExpando
[
this
]
;
Uri
get
httpAddress
=>
this
!=
null
?
_httpAddressExpando
[
this
]
:
null
;
/// Set the asset directory for the an attached Flutter view.
Future
<
void
>
setAssetDirectory
({
...
...
packages/flutter_tools/test/general.shard/vmservice_test.dart
View file @
719ea5a8
...
...
@@ -395,6 +395,13 @@ void main() {
);
expect
(
fakeVmServiceHost
.
hasRemainingExpectations
,
false
);
});
testWithoutContext
(
'expandos are null safe'
,
()
{
vm_service
.
VmService
vmService
;
expect
(
vmService
.
httpAddress
,
null
);
expect
(
vmService
.
wsAddress
,
null
);
});
}
class
MockDevice
extends
Mock
implements
Device
{}
...
...
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