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

Issue 898593 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Figure out some abstractions for Mojo Binding / InterfacePtr to reduce usage of base::Unretained

Project Member Reported by dcheng@chromium.org, Oct 24

Issue description

Currently a lot of callbacks passed to Mojo require a lot of base::Unretained(). It would be nice to think of patterns that reduce the prevalence of this; many times, the InterfacePtr / Binding is owned by |this|, so having to annotate each reply callback / connection error handler with a comment that this is safe because the corresponding Mojo construct is owned by |this| and won't invoke its callbacks after it goes out of scope, yadda yadda yadda, is a lot of wasted boilerplate.
 
Components: -Internals>Mojo Internals>Mojo>Bindings
I'm having a very hard time imagining a realistic solution to this in C++. Did you have any specific directions you were considering?

Sign in to add a comment