-
Notifications
You must be signed in to change notification settings - Fork 9.7k
core: remove dependency on devtools-frontend NetworkRequest #5451
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
Changes from 1 commit
3848575
58e7c51
f35c56c
ade9def
05194ea
dd11851
5988b11
1c16232
aecb428
432b989
0324bc0
c5db54d
5836b4c
cee1f0e
4212ab6
7634cf8
21fe6df
1f0ac70
915449f
95551ee
92e8abf
b831cbb
911a268
d11d2e7
a2015af
e5bea12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,8 @@ module.exports = class NetworkRequest { | |
| constructor() { | ||
| this.requestId = ''; | ||
| this._requestId = ''; | ||
| this.connectionId = ''; | ||
| // TODO(phulce): remove default DevTools connectionId | ||
| this.connectionId = '0'; | ||
| this.connectionReused = false; | ||
|
|
||
| this.url = ''; | ||
|
|
@@ -138,6 +139,8 @@ module.exports = class NetworkRequest { | |
| * @param {LH.Crdp.Network.LoadingFinishedEvent} data | ||
| */ | ||
| onLoadingFinished(data) { | ||
| if (this.finished) return; | ||
|
Contributor
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. when does this happen and is that bad or just expected?
Collaborator
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. it seems to be expected for a certain class of request failures (aborted redirected requests) not sure how to best comment it...maybe?
Contributor
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. I think that's 👍 |
||
|
|
||
| this.finished = true; | ||
| this.endTime = data.timestamp; | ||
| if (data.encodedDataLength >= 0) { | ||
|
|
@@ -151,6 +154,8 @@ module.exports = class NetworkRequest { | |
| * @param {LH.Crdp.Network.LoadingFailedEvent} data | ||
| */ | ||
| onLoadingFailed(data) { | ||
| if (this.finished) return; | ||
|
|
||
| this.finished = true; | ||
| this.endTime = data.timestamp; | ||
|
|
||
|
|
@@ -187,6 +192,9 @@ module.exports = class NetworkRequest { | |
| * @param {LH.Crdp.Network.ResponseReceivedEvent['type']=} resourceType | ||
| */ | ||
| _onResponse(response, timestamp, resourceType) { | ||
| this.url = response.url; | ||
| this._url = response.url; | ||
|
|
||
| this.connectionId = String(response.connectionId); | ||
| this.connectionReused = response.connectionReused; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as mentioned, i'd love if a followup normalized these paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah for sure 👍