-
Notifications
You must be signed in to change notification settings - Fork 400
Fix Network tab not capturing requests after hot restart and clear #9856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
a6a57ff
043132a
a4a7608
7d34604
08e070f
afdea78
2149f89
f37ac2a
e175e22
1253cea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -192,6 +192,15 @@ class NetworkController extends DevToolsScreenController | |
| _currentNetworkRequests, | ||
| _filterAndRefreshSearchMatches, | ||
| ); | ||
| autoDisposeStreamSubscription( | ||
| serviceConnection.serviceManager.isolateManager.onIsolateCreated.listen(( | ||
| _, | ||
| ) async { | ||
| if (_recordingNotifier.value) { | ||
| await allowedError(_enableNetworkTrafficRecordingOnAllIsolates()); | ||
| } | ||
| }), | ||
| ); | ||
| } | ||
|
|
||
| @override | ||
|
|
@@ -327,7 +336,7 @@ class NetworkController extends DevToolsScreenController | |
| // Cancel existing polling timer before starting recording. | ||
| _updatePollingState(false); | ||
|
|
||
| networkService.updateLastHttpDataRefreshTime( | ||
| await networkService.updateLastHttpDataRefreshTime( | ||
| alreadyRecordingHttp: alreadyRecordingHttp, | ||
| ); | ||
| final timestamp = await networkService.updateLastSocketDataRefreshTime( | ||
|
|
@@ -352,11 +361,16 @@ class NetworkController extends DevToolsScreenController | |
|
|
||
| // TODO(kenz): only call these if http logging and socket profiling are not | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did this TODO get addressed by this PR? If not, please add it back so that we don't lose track of this work.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch — it was not addressed by this PR. I restored the TODO above |
||
| // already enabled. Listen to service manager streams for this info. | ||
| await _enableNetworkTrafficRecordingOnAllIsolates(); | ||
| await togglePolling(true); | ||
| } | ||
|
|
||
| /// Enables HTTP timeline logging and socket profiling on all isolates. | ||
| Future<void> _enableNetworkTrafficRecordingOnAllIsolates() async { | ||
| await [ | ||
| http_service.toggleHttpRequestLogging(true), | ||
| networkService.toggleSocketProfiling(true), | ||
| ].wait; | ||
| await togglePolling(true); | ||
| } | ||
|
|
||
| Future<void> stopRecording() async { | ||
|
|
@@ -382,7 +396,7 @@ class NetworkController extends DevToolsScreenController | |
| /// This will ensure that future fetches for http and socket requests will at | ||
| /// most fetch requests since [updateLastRefreshTime] was called. | ||
| Future<void> updateLastRefreshTime() async { | ||
| networkService.updateLastHttpDataRefreshTime(); | ||
| await networkService.updateLastHttpDataRefreshTime(); | ||
| await networkService.updateLastSocketDataRefreshTime(); | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.