File tree Expand file tree Collapse file tree 3 files changed +8
-19
lines changed Expand file tree Collapse file tree 3 files changed +8
-19
lines changed Original file line number Diff line number Diff line change 1
1
## 0.0.19 - 2019-05-?? (in progress)
2
- * Update DevTools server to better handle failures when launching browsers
2
+ * Update DevTools server to better handle failures when launching browsers.
3
+ * Support additional formats for VM service uris.
3
4
4
5
## 0.0.18 - 2019-04-30
5
- * Fix release bug (0.0.17-dev.1 did not include build folder)
6
+ * Fix release bug (0.0.17-dev.1 did not include build folder).
6
7
* Add CPU profiler (preview) to timeline page.
7
8
* CPU flame chart UI improvements and bug fixes.
8
9
* Bug fixes for DevTools on Windows.
Original file line number Diff line number Diff line change @@ -150,22 +150,10 @@ String longestFittingSubstring(
150
150
/// For example, given a [value] of http://127.0.0.1:60667/72K34Xmq0X0=/#/vm,
151
151
/// this method will return the URI http://127.0.0.1:60667/72K34Xmq0X0=/.
152
152
Uri getTrimmedUri (String value) {
153
- final startingUri = Uri .parse (value);
154
- final startingPath = startingUri.path;
155
-
156
- if (startingPath.isEmpty || startingPath == '/' ) {
157
- return Uri .parse (value);
158
- }
159
-
160
- // [startingPath] should be of the form "/72K34Xmq0X0=/", but it could have
161
- // trailing characters. Trim any excess chars beyond the second slash in the
162
- // uri path.
163
- final pathParts = startingPath.split ('/' );
164
- final newPath = pathParts.take (2 ).join ('/' );
165
- final indexOfPath = value.indexOf (newPath);
166
-
167
- // Add a trailing slash to the path.
168
- return Uri .parse (value.substring (0 , indexOfPath + newPath.length) + '/' );
153
+ final uri = Uri .parse (value.trim ());
154
+ return uri
155
+ .removeFragment ()
156
+ .replace (path: uri.path.endsWith ('/' ) ? uri.path : '${uri .path }/' );
169
157
}
170
158
171
159
class Property <T > {
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ void main() {
231
231
);
232
232
expect (
233
233
getTrimmedUri ('http://127.0.0.1:60667' ).toString (),
234
- equals ('http://127.0.0.1:60667' ),
234
+ equals ('http://127.0.0.1:60667/ ' ),
235
235
);
236
236
expect (
237
237
getTrimmedUri ('http://127.0.0.1:60667/' ).toString (),
You can’t perform that action at this time.
0 commit comments