Closed Bug 1675062 Opened 5 years ago Closed 5 years ago

A snippet is wrongly displayed on the first New Tab to be opened after disabling Snippets

Categories

(Firefox :: Messaging System, defect)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
84 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox82 --- unaffected
firefox83 --- unaffected
firefox84 --- verified

People

(Reporter: mheres, Assigned: mconley)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image snippet displayed.gif

[Affected versions]:

  • Firefox Nightly 84.0a1 (Build ID: 20201103095421)

[Affected Platforms]:

  • Windows 10
  • Linux Mint 20
  • macOS 10.15

[Prerequisites]:

  • Have Firefox Nightly 84.0a1 installed and open.
  • Have snippets enabled.

[Steps to reproduce]:

  1. Open a new tab to observe that snippets are displayed.
  2. Navigate to “about:preferences#home” and untick the “Snippets” checkbox.
  3. Open a new tab and observe the behavior.

[Expected result]:

  • A snippet is NOT displayed on a new tab opened after disabling them.

[Actual result]:

  • A snippet is displayed on the first new tab opened.

[Regression Info]:

[Notes]:

  • The snippets on new tabs opened before disabling Snippets will also remain displayed.
  • Attached is a recording of the issue.
Component: New Tab Page → Messaging System
Assignee: nobody → mconley
Regressed by: 1614465
Has Regression Range: --- → yes

I can reproduce. It seems that the preloaded about:newtab isn't getting the snippet state update.

Status: NEW → ASSIGNED

The problem is here: https://searchfox.org/mozilla-central/rev/c938c7416c633639a5c8ce4412be586eefb48005/browser/components/newtab/lib/ASRouter.jsm#594-601

This code is expecting that _updateMessageProviders returns an array of message IDs. However, it actually returns an array of provider IDs that have been disabled. This ultimately gets sent do the child with the “ClearMessages” message, but that ID (being for a provider and not a message) is then ignored.

Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4aad474fb048 Re-add capability to notify content about cleared ASRouter providers. r=andreio
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

I have verified this issue is no longer reproducible on the latest Nightly 84.0a1 (Build ID: 20201108212832) on Windows 10, macOS 10.15.7, Mint 20. After Snippets are disabled they are removed from already open tabs and are not displayed for any new tabs.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: