Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Pinning tabs with multiple windows open results in duplicates #11861

Closed
petemill opened this issue Nov 8, 2017 · 0 comments
Closed

Pinning tabs with multiple windows open results in duplicates #11861

petemill opened this issue Nov 8, 2017 · 0 comments

Comments

@petemill
Copy link
Member

petemill commented Nov 8, 2017

Description

Pinning tabs often causes those tabs to be pinned multiple times, especially if there is more than 1 window open. This is likely because updatePinnedTabs fires cyclically, i.e:
1. A tab is pinned in windowA
2. updatePinnedTabs is called to ensure all other windows get the pinned tabs
3. windowB has the tab pinned, which causes…
4. updatePinnedTabs to be called
5. State is not necessarily up to date, so windowB or windowC gets the tab pinned again

Steps to Reproduce

  1. Open window1
  2. Open window2
  3. Open a tab in window1
  4. Pin a tab in window1

This can then cause some weird errors when a window's tab state is out of sync with what it should have.

Actual result:

  • The tab is pinned twice in window2 and once in window1

Expected result:

  • The tab is pinned once in window2 and once in window1

Reproduces how often:

Brave Version

about:brave info:
master (0.22)

Reproducible on current live release:
No

@petemill petemill self-assigned this Nov 8, 2017
@petemill petemill added this to the Triage Backlog milestone Nov 8, 2017
petemill added a commit to petemill/browser-laptop that referenced this issue Nov 9, 2017
petemill added a commit to petemill/browser-laptop that referenced this issue Nov 9, 2017
@cezaraugusto cezaraugusto added priority/P4 Minor loss of function. Workaround usually present. priority/P2 Crashes. Loss of data. Severe memory leak. and removed priority/P4 Minor loss of function. Workaround usually present. labels Nov 21, 2017
@bsclifton bsclifton modified the milestones: Triage Backlog, Prioritized Backlog Nov 21, 2017
@petemill petemill modified the milestones: Backlog (Prioritized), 0.20.x (Beta Channel) Dec 23, 2017
petemill added a commit to petemill/browser-laptop that referenced this issue Dec 23, 2017
…combination

Use WeakMap so that we lose the reference to an old state when we lose the reference to an old window

Fix brave#11861
bsclifton pushed a commit to petemill/browser-laptop that referenced this issue Dec 24, 2017
…combination

Use WeakMap so that we lose the reference to an old state when we lose the reference to an old window

Fix brave#11861
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.