Closed Bug 1818392 Opened 2 years ago Closed 2 years ago

browser.tabs.onUpdated unnecessary call many times

Categories

(WebExtensions :: General, defect)

Firefox 110
defect

Tracking

(firefox110 affected, firefox111 affected, firefox112 affected)

RESOLVED DUPLICATE of bug 1405603
Tracking Status
firefox110 --- affected
firefox111 --- affected
firefox112 --- affected

People

(Reporter: drive4ik, Unassigned)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0

Steps to reproduce:

The tab's changeInfo object in the browser.tabs.onUpdated listener has not changed since the previous call

Calling the browser.tabs.onUpdated listener is unnecessary because the tab key and its state have not changed at the moment. This is very important, because this unnecessary call of the NOT changed tab state generates false actions in addons which subscribe to this event. Also, all this pointless action wastes browser and operating system memory.

Actual results:

Preview of the temporary addon in the attachments
Please, open addon debug console before click browser action button

Expected results:

The call of the listener browser.tabs.onUpdated must be a one-time call for one or more changed keys at once

Attached image screenshot.png

The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Tabbed Browser
Component: Tabbed Browser → General
Product: Firefox → WebExtensions

Hello,

I reproduced the issue on the latest Nightly (112.0a1/20230226214053), Beta (111.0b6/20230226190100) and Release (110.0/20230214051806) under Windows 10 x64 and macOS 11.3.1.

Clicking the add-on button will log messages similar to the ones from the screenshot in Comment 1.

For further details, see the attached screenshot.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached image 2023-02-27_09h41_06.png
Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1405603
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: