File tree 7 files changed +126
-134
lines changed
7 files changed +126
-134
lines changed Original file line number Diff line number Diff line change 1
1
## 11.3.1-dev
2
2
3
+ - Encode extension url asynchronously.
4
+ - Use default constant port for debug service.
5
+ - If we fail binding to the port, fall back to previous strategy
6
+ of finding unbound ports.
3
7
- Add metrics measuring DevTools Initial Page Load time.
4
8
- Add ` ext.dwds.sendEvent ` service extension to dwds so other tools
5
9
can send events to the debugger.
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ class Dwds {
121
121
globalLoadStrategy = loadStrategy;
122
122
123
123
DevTools devTools;
124
- String extensionUri;
124
+ Future < String > extensionUri;
125
125
ExtensionBackend extensionBackend;
126
126
if (enableDebugExtension) {
127
127
final handler = useSseForDebugBackend
@@ -134,13 +134,13 @@ class Dwds {
134
134
: WebSocketSocketHandler ();
135
135
136
136
extensionBackend = await ExtensionBackend .start (handler, hostname);
137
- extensionUri = Uri (
137
+ extensionUri = Future . value ( Uri (
138
138
scheme: useSseForDebugBackend ? 'http' : 'ws' ,
139
139
host: extensionBackend.hostname,
140
140
port: extensionBackend.port,
141
141
path: r'$debug' )
142
- .toString ();
143
- if (urlEncoder != null ) extensionUri = await urlEncoder (extensionUri);
142
+ .toString ()) ;
143
+ if (urlEncoder != null ) extensionUri = urlEncoder (await extensionUri);
144
144
}
145
145
146
146
var serveDevTools = devtoolsLauncher != null ;
Original file line number Diff line number Diff line change @@ -33,15 +33,15 @@ const _clientScript = 'dwds/src/injected/client';
33
33
/// information.
34
34
class DwdsInjector {
35
35
final LoadStrategy _loadStrategy;
36
- final String _extensionUri;
36
+ final Future < String > _extensionUri;
37
37
final _devHandlerPaths = StreamController <String >();
38
38
final _logger = Logger ('DwdsInjector' );
39
39
final bool _enableDevtoolsLaunch;
40
40
final bool _useSseForInjectedClient;
41
41
42
42
DwdsInjector (
43
43
this ._loadStrategy, {
44
- String extensionUri,
44
+ Future < String > extensionUri,
45
45
bool enableDevtoolsLaunch,
46
46
bool useSseForInjectedClient,
47
47
}) : _extensionUri = extensionUri,
@@ -104,7 +104,7 @@ class DwdsInjector {
104
104
appId,
105
105
devHandlerPath,
106
106
entrypoint,
107
- _extensionUri,
107
+ await _extensionUri,
108
108
_loadStrategy,
109
109
_enableDevtoolsLaunch,
110
110
);
You can’t perform that action at this time.
0 commit comments