New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 672881 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

mojo::StrongBindingPtr and Containers is inelligent

Project Member Reported by jonr...@chromium.org, Dec 9 2016

Issue description

mojo::StrongBindingPtr is a nice way to setup connections. 
  - They handle self destruction in response to onConnectionError
  - They delete the mojo interface implementation as well
  - They are a base::WeakPtr which allows the code that creates it to cleanly know not to perform more actions, as it is already dead
  - They provide a method to close the connection
  - They offer a callback for when they are self destructing

However we currently lack a nice way for handling several mojo::StrongBindingPtr within a container. This can lead to containers bloating with several cleared base::WeakPtrs, and requires callsites to clean up their own containers.

mojo::PtrSet is a similar construct used for several observer patterns. This container similarly clears out base::WeakPtrs, however only upon subsequent actions performed on the set.

I would like to make a container for mojo::StrongBindingPtr which listens for the destruction, and removes the cleared base::WeakPtrs from itself.
 
Status: WontFix (was: Assigned)
Someone else already landed this: https://codereview.chromium.org/2692413002
Components: -MUS Internals>Services>WindowService

Sign in to add a comment