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

Issue 729175 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Add pre and post binding processing hooks

Project Member Reported by sky@chromium.org, Jun 2 2017

Issue description

For mus we want the ability to do processing both before and after every incoming message. Ideally there would be an interface we can supply to the bindings object that is called before and after every message, e.g.:

void OnWillProcessMessage();
void OnDidProcessMessage();

We don't need to know the message or alter it, just the before and after calls.
 
We already support the OnWillProcessMessage() by Binding::AddFilter:
https://cs.chromium.org/chromium/src/mojo/public/cpp/bindings/binding.h?rcl=424a0fd2d03d63853f57258fdbd08ba5751dae17&l=117

It should be easy to add the other.
Ah, I realize that you probably want guarantee that for each OnWillProcessMessage there is exactly one OnDidProcessMessage. (Right?)

If that is the case, Binding::AddFilter may not be the best choice. Filters could cancel message dispatching. So it is possible to cause mismatch if we use a filter as OnWillProcessMessage (and invent some other way to observe OnDidProcessMessage).

Comment 3 by sky@chromium.org, Jun 2 2017

That's right. This interface would have to be called after MessageReceivers.
Cc: -roc...@chromium.org rockot@google.com
Labels: Needs-Feedback
sky@: is this still relevant?
Status: WontFix (was: Untriaged)
The reason I wanted this doesn't really apply anymore. Closing.

Sign in to add a comment