mojo::ReportBadMessage crashes the browser if there's a return callback that's not invoked |
||
Issue descriptionIn my opinion, we shouldn't have to invoke the return callback on a bad message (since we'd have to make up bogus values to pass back). However, Mojo currently DCHECKs that the return callback is always invoked. Crash stack in Mojo: https://paste.googleplex.com/5362279369408512?raw Original CL that prompted this investigation: https://codereview.chromium.org/2711173002/
,
Feb 23 2017
Note that we don't DCHECK if the Binding responsible for a dropped callback has been closed first. The correct thing to do when reporting a bad message is to either invoke the callback anyway or Close the corresponding Binding. I'm not sure any of this behavior is incorrect, particularly since ReportBadMessage does not in all scenarios imply that you're going to get shot or your pipe is going to be broken.
,
Feb 23 2017
If the right behavior here is to close the binding, I'm OK with WontFixing this.
,
Feb 23 2017
Closing the binding sounds like a reasonable solution to me, thanks!
,
Feb 23 2017
Thanks Ken! Another possible solution is to change the DCHECK to a DVLOG message. But that would be harder for the developers to find out why when they accidentally drop a callback (which lead to pipe disconnection). So I lean towards keeping the current behavior and suggest the developers to adopt either of the solutions mentioned by Ken. WDYT?
,
Feb 23 2017
(Oops, didn't see comment #3 and #4 before I replied.) |
||
►
Sign in to add a comment |
||
Comment 1 by yzshen@chromium.org
, Feb 23 2017