Cherry-pick commit d4b35115 to get parseUnsafe.