Add check to make TextMatchMarker cast safer

Currently, ToTextMatchMarker() is an unchecked cast. This CL adds a condition
for describing when this cast is safe so this cast can be DCHECKed in debug
mode.

BUG=707867

Review-Url: https://codereview.chromium.org/2904123003
Cr-Commit-Position: refs/heads/master@{#475112}
1 file changed