Closed Bug 1652469 Opened 4 years ago Closed 3 years ago

Storage changes are not delivered to storage.onChanged listeners in options page

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: yuki, Unassigned)

Details

Attachments

(1 file)

1.02 KB, application/x-xpinstall
Details
No description provided.
Attached file testcase.xpi

Sorry I mistakenly posted without description...

Changes done by storage.local.get() should be delivered to storage.onChanged listeners, but changes won't be delivered to listeners added in the options page.

Steps to reproduce

  1. Start Thunderbird.
  2. Load the attached testcase. It will be listed as "testcase" in the addons manager.
  3. Go to options page of the addon.
  4. Type any text into the input field.

Actual result

  • The text below the "current local storage" heading is updated via window.setTimeout().
  • Nothing is printed below the "notified onChanged events" heading.

Expected result

  • The text below the "current local storage" heading is updated via window.setTimeout().
  • Notified changes are printed below the "notified onChanged events" heading.

Environment

  • Windows 10 1909
  • Daily 80.0a1 Build ID: 20200712123207
  • Thunderbird 78.0b4 Build ID: 20200629202523

I got the expected result on Firefox successfully, so this is a problem only on Thunderbird.

The difference is e10s in the options page. See Bug 1641577 and Bug 1607859 for example. But the storage.onChanged event will be triggered in background.js if you add the listener there and do storage.local.set() in options.js.

This works now in TB88 (daily) and in TB87.b01. So it is not related to bug 1692975 and friends, but simply fixed by enabling e10s.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: