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

Issue 599498 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Mojo primer should make explicit that callbacks will never get called if the InterfacePtr is destroyed.

Project Member Reported by ortuno@chromium.org, Mar 31 2016

Issue description

From scheib:

Unretained always makes a reader wonder, "Is it clear that this class will outlive the callback?" Well, to me it isn't 100% clear. I'm guessing it is because mojo wouldn't dispatch the callback if the class didn't still exist, but I'm not clear on when/why a reader knows that. I didn't see it in the mojo primer, it's not obvious elsewhere. We should ping mojo folk so that this pattern is either documented in mojo primer, or to have the code read in a way where we don't have this (e.g. weak pointer).

 

Comment 1 by roc...@chromium.org, Apr 25 2016

Status: Fixed (was: Available)
I added some information about this to a new doc on message validation and error handling as part of a larger effort to fill out mojo docs.

https://sites.google.com/a/chromium.org/dev/developers/design-documents/mojo/validation

Sign in to add a comment