Add is_bound check to receiver_ in DelegatedInkPointRendererBase
Because RenderWidgets exist 1:1 with tabs, if delegated ink trails are being used in one tab, and then another tab starts using them, a second mojo pipeline between browser proc and viz will try to be created. However, since there is only one receiver in viz and it is already bound, we hit a DCHECK() and crash. The fix is to just add an if check in viz, and if the receiver is already bound, then reset it and bind the new PendingReceiver. This makes sure that the feature is available on the most recent tab to use it. Moving the Remote from RenderWidgetHostViewEventHandler to somewhere that it can exist 1:many with tabs is another possible solution. This would also have the benefit of exactly one IPC to make the connection for all tabs in a window. However, that would require the Remote to move to a much less obvious place for it to live, and since the trade off is only one extra IPC call per tab switch (when the new tab starts using the API - if it never uses it, no IPC call), it is unlikely to cause any noticeable performance regression. Bug: 1138602 Change-Id: I2ea9bb0962ac6e67b21276d0b75d9c455e7ede76 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2472901Reviewed-by:Jonathan Ross <jonross@chromium.org> Reviewed-by:
Daniel Libby <dlibby@microsoft.com> Commit-Queue: Mario Bianucci <mabian@microsoft.com> Cr-Commit-Position: refs/heads/master@{#817672}
Showing
Please register or sign in to comment