Skip to content

Return null instead of throwing an error if it fails to get the resource name in active tab view#4905

Merged
canova merged 3 commits into
firefox-devtools:mainfrom
canova:active-tab-no-innerwindowid
Feb 3, 2024
Merged

Return null instead of throwing an error if it fails to get the resource name in active tab view#4905
canova merged 3 commits into
firefox-devtools:mainfrom
canova:active-tab-no-innerwindowid

Conversation

@canova

@canova canova commented Jan 31, 2024

Copy link
Copy Markdown
Member

This fixes #4834.

Previously if it was failing to find a resource name, it was throwing an error. This was happening because we are explicitly excluding the about:blank and about:newtab pages. They are excluded so we can find the correct page name.

Deploy previews:
Before / After
Before / After

┆Issue is synchronized with this Jira Task

@canova canova requested a review from julienw January 31, 2024 11:58
@codecov

codecov Bot commented Jan 31, 2024

Copy link
Copy Markdown

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (c1b4d06) 88.43% compared to head (5f9ec02) 88.46%.
Report is 3 commits behind head on main.

❗ Current head 5f9ec02 differs from pull request most recent head ba5b1e5. Consider uploading reports for the commit ba5b1e5 to get more accurate results

Files Patch % Lines
src/test/fixtures/profiles/tracks.js 54.54% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4905      +/-   ##
==========================================
+ Coverage   88.43%   88.46%   +0.02%     
==========================================
  Files         304      304              
  Lines       27192    27207      +15     
  Branches     7329     7335       +6     
==========================================
+ Hits        24047    24068      +21     
+ Misses       2927     2923       -4     
+ Partials      218      216       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@julienw julienw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

Comment thread src/profile-logic/active-tab.js Outdated
@canova canova force-pushed the active-tab-no-innerwindowid branch 2 times, most recently from ba5b1e5 to 2b78ee5 Compare February 3, 2024 11:18
…rce name in active tab view

Previously if it was failing to find a resource name, it was throwing an
error. This was happening because we are explicitly excluding the
`about:blank` and `about:newtab` pages. They are excluded so we can find
the correct page name.
For some reason we weren't printing the resource tracks. This wasn't
great because it's important to see all the resources there to be able
to test the active tab correctly.
This test is crashing when you revert the first commit. I had to change
the setup function to make sure that it doesn't overwrite the
profile.pages array that we overwritten already with a custom page url.
@canova canova force-pushed the active-tab-no-innerwindowid branch from 2b78ee5 to 706ddfb Compare February 3, 2024 11:19
@canova canova merged commit 3d3f873 into firefox-devtools:main Feb 3, 2024
@canova canova deleted the active-tab-no-innerwindowid branch February 5, 2024 10:25
@julienw julienw mentioned this pull request Feb 6, 2024
julienw added a commit that referenced this pull request Feb 6, 2024
[@canova Nazım Can Altınova] Return null instead of throwing an error if it fails to get the resource name in active tab view (#4905)
[@fqueze Florian Quèze] Improve the precision of the getFittedText implementation. (#4893)
[@fqueze Florian Quèze] Show marker count next to the marker name in the marker chart when a marker is hovered. (#4892)
[@mstange Markus Stange] Convert some code to use the non-inverted call node table even while we're showing the inverted call tree (Merge PR #4899)
[@canova Nazım Can Altınova] Bring the max stacking depth limit back for marker timings (#4898)
[@mstange Markus Stange] Various preparations in call tree code for fast inverted tree (Merge PR #4897)
[@mstange Markus Stange] Move call node path/index conversion functions into CallNodeInfo (Merge PR #4896)
[@mstange Markus Stange] Make mergeFunction fast (Merge PR #4895)
[@gthb Gunnlaugur Thor Briem] feat: support from-url profiles in compare (#4875)

And all the locale contributors:
de: Michael Köhler
el: Jim Spentzos
en-GB: Ian Neal
es-CL: ravmn
fr: Théo Chevalier
fy-NL: Fjoerfoks
ia: Melo46
it: Francesco Lodolo [:flod]
nl: Fjoerfoks, Mark Heijl
pt-BR: Marcelo Ghelman
ru: Valery Ledovskoy
sv-SE: Andreas Pettersson
uk: Artem Polivanchuk
zh-CN: 你我皆凡人, Olvcpr423, Pontoon
zh-TW: Pin-guang Chen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In the active tab view, make the code that looks for the name of resource tracks fallible

2 participants