Closed Bug 1372442 Opened 7 years ago Closed 7 years ago

Session restored tabs should trigger browser.tabs.onCreated listeners

Categories

(WebExtensions :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: eoger, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: triaged)

I did saw browser.tabs.onUpdated being triggered however.
Can you please be more explicit about the problem you are seeing? What are the steps to reproduce this problem? Can you attach a sample of WebExtension code that reproduces this problem? I tested this myself by closing a tab and then restoring it via History -> Recently Closed Tabs, and I did get an onCreated event.
Flags: needinfo?(eoger)
I'm currently using https://github.com/eoger/tabcenter-redux (which is not very minimal). STR: 1. Start the browser. 2. Open 2-3 tabs. 3. Crash the browser. 4. Start the browser again. 5. about:sessionrestore is shown, click the "Restore" button. Expected: 5. Tabs are present in the sidebar because onCreated listeners were called. Actual: 5. Tabs are not present, onCreated is not triggered.
Flags: needinfo?(eoger)
Sounds like a timing issue where the listeners are not registered before the tabs are restored, or perhaps we're not listening for the correct event. I'll leave this to be discussed in the weekly triage next week.
> Sounds like a timing issue where the listeners are not registered before the tabs are restored I leave plenty of time for the extension to load before clicking the "Restore" button.
Priority: -- → P2
Whiteboard: triaged
Need the addEventListener("SSTabRestoring" ... in onCreated?
Depends on: 1364019
It looks like the problem is resolved, I can't reproduce anymore.
WFM for now in 56.0a1 (2017-07-23) x86 with Tab Center Redux 0.4.0.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.