Ensure that we always pass a non-null WTF string to mojo calls.
This fixes a crashing bug, where an empty WebString is passed to WriteImage for the title parameter. When mojo serializes this it is converted to a WTF::String that mojo detects is null and sends null across the wire. On the receive side it is expecting a non null string so deserialization of the message fails. This patch sends an empty string instead of a null string, which matches the pre-mojo state of the code that used to call Utf16() on the WebString. Bug: 794512 Change-Id: I3eb8d6c23ca6a9ff435802521366f03f7cb60d43 Reviewed-on: https://chromium-review.googlesource.com/826826Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Sam McNally <sammc@chromium.org> Commit-Queue: Stuart Langley <slangley@chromium.org> Cr-Commit-Position: refs/heads/master@{#524155}
Showing
Please register or sign in to comment