Fix `newtab.closed` and `newtab.sections_impression` firing unexpectedly
Categories
(Firefox :: New Tab Page, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: joelkelly, Assigned: joelkelly)
References
(Blocks 1 open bug)
Details
(Whiteboard: [hnt][hnt-journeys])
Attachments
(3 files)
Stop emitting these events when a link is opened in a new window or tab via the topsite menu, content menu, or weather right-click.
Affected actions:
- open topsite/content menu -> new window
- right click topsite/content -> new tab
- right click weather -> new window
#eventBuffer is a single instance-level buffer shared by every newtab
session, and it is only drained by #clearEventBuffer, which today runs
from endSession() and transitionToPrivateSession(). Sessions still open
when the feed goes away never receive a NEW_TAB_UNLOAD, so they never
call endSession and everything they queued is dropped: uninit() discarded
the buffer without sending it.
Updated•2 months ago
|
endSession() recorded newtab.closed, drained the shared event buffer and
submitted the newtab ping before it checked whether the session had ever
been visible. The never-shown guard sat about 35 lines further down, so
it only ever suppressed the session_duration bookkeeping: hidden preloaded
newtabs still produced a full newtab_session_end ping carrying a
newtab.closed event for a visit the user never saw.
Updated•2 months ago
|
Updated•2 months ago
|
Every concurrent newtab session shares one event buffer, and its entries
carry no session identity. Whichever session ends first drains and reports
the events queued by all the others, in a ping that describes the wrong
session.
Tag each queued event with the session that recorded it, and drain only that
session's events. The tag routes events and is never reported, so the data is
unchanged.
Updated•2 months ago
|
Updated•2 months ago
|
Comment 5•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ca1e964ff660
https://hg.mozilla.org/mozilla-central/rev/f26fbdcd3f60
https://hg.mozilla.org/mozilla-central/rev/01a761b400cf
Updated•1 month ago
|
Description
•