core(trace-of-tab): only use navstart of chrome/http documents #5917
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The underlying issue in #3838 is that we use the navstart of a navigation that is immediately cancelled and never takes place. Thus, we end up looking for all of our events of importance in the wrong timeframe.
The redirect comment (#3838 (comment)) got me thinking about the correct navstart to be using though, and it seems like we should be capturing that performance hit and warning folks that they have multiple navigations. I wrote out a nice long argument for why we should do this, but I couldn't even convince myself it was the right thing to do since we'll break many existing customers that are ignorant of client-side redirects today.
Instead I've installed a quick fix that ignores navigations to targets that we're not interested in. i.e. only HTTP navigationStart events count. This fixes the taobao case and should fix the other custom protocol cases where this has popped up.
Related Issues/PRs
fixes #3838