Closed Bug 1750182 Opened 3 years ago Closed 3 years ago

[devtools] Reloading the page breaks the Inspector's font highlighter

Categories

(DevTools :: Inspector, defect)

defect

Tracking

(firefox-esr91 unaffected, firefox96 wontfix, firefox97 wontfix, firefox98 fixed)

RESOLVED FIXED
98 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox96 --- wontfix
firefox97 --- wontfix
firefox98 --- fixed

People

(Reporter: jfkthame, Assigned: nchevobbe)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

STR:

  • Load a simple page, e.g.
data:text/html,<h1>hello <i>world
  • Open the DevTools Inspector and inspect the <body> element
  • Select the Fonts panel, which should show the font family used (e.g. Times) and the specific faces (Bold and Bold-Italic)
  • Hover over the individual font face names, and observe that the relevant content is highlighted in the document
  • Reload the page (click the Reload button, press Cmd-R, whatever...)
  • Again, hover over the font face names in the Inspector; observe that it no longer highlights the associated text in the document.

Opening the Browser Console reveals relevant error messages:

Async method failed in safeAsyncMethod Error: Can not send request 'show' because front 'customhighlighter' is already destroyed.
    name resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:28
    show resource://devtools/client/fronts/highlighters.js:27
    safeAsyncMethod resource://devtools/shared/async-utils.js:61
    onToggleFontHighlight resource://devtools/client/inspector/fonts/fonts.js:884
    onNameMouseOver resource://devtools/client/inspector/fonts/components/FontName.js:30
    React 14
        invokeGuardedCallbackImpl
        invokeGuardedCallback
        invokeGuardedCallbackAndCatchFirstError
        executeDispatch
        executeDispatchesInOrder
        executeDispatchesAndRelease
        executeDispatchesAndReleaseTopLevel
        forEachAccumulated
        runEventsInBatch
        runExtractedEventsInBatch
        handleTopLevel
        batchedUpdates$1
        batchedUpdates
        dispatchEvent

Closing and re-opening the Inspector restores the highlighting functionality, until the next time the document is reloaded, when it will break again.

Mozregression points to:
14:53.15 INFO: Last good revision: 556581f9b280231c5d9bcd0df3de0870e4e23d67
14:53.15 INFO: First bad revision: 62ee94c26f8f0e526f2d381b6c5ef50effef20ff
14:53.15 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=556581f9b280231c5d9bcd0df3de0870e4e23d67&tochange=62ee94c26f8f0e526f2d381b6c5ef50effef20ff
which implicates bug 1702715 here. However, simply reverting the devtools.target-switching.server.enabled pref does not fix the issue, which must be due to other changes since that landed.

Set release status flags based on info from the regressing bug 1702715

Let me have a look

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

This will cause a new highlighter to be created when onToggleFontHighlight
is called next.
Ideally, we wouldn't have a reference to the highlighter as this is probably
not working for Fission, and we would use the HighlightersOverlay like the
other inspector panel, but that probably requires its own bug.
A test is added to ensure this works as expected.

Overall Fonts panel fission bug is at Bug 1572655

Blocks: 1572655
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14b905e3bd14 [devtools] Clear FontHighlighter reference on will-navigate. r=jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch

The patch landed in nightly and beta is affected.
:nchevobbe, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(nchevobbe)
Has Regression Range: --- → yes

Given that 1. this has been around for a few releases already, 2. the issue is not preventing the tool to "work" in the end and 3. is not in a massively used panel, I think we don't need to uplift.

Flags: needinfo?(nchevobbe)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: