Add UnencodableHandling::kNoUnencodables
The are no unencodable characters in UTF-8, however previously callers to blink::TextCoder::Encode had to pass a dummy UnencodableHandling argument. Add a kNoUnencodables value to the UnencodableHandling which is an explicit no-op. Also add DCHECKs that is is only used for UTF-8 or UTF-16. Convert callers to use kNoUnencodables where the encoding is statically known to be UTF-8. It's still valid to use other values for the UnencodableHandling argument with UTF-8 or UTF-16; kNoUnencodables simply documents that it makes no difference. Change-Id: I5eebe4c76ae4006ee91f3884f94ec3b5e410685b Reviewed-on: https://chromium-review.googlesource.com/1206055Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Reviewed-by:
Joshua Bell <jsbell@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#589451}
Showing
Please register or sign in to comment