Although his baptism happened in August 1850 in Salt Lake, he probably traveled with a nonMormon company en route to the gold fields, which could have reached Salt Lake in July.
Sources:
"Death of James M. Barlow," Deseret Weekly, 18 Feb. 1893, 281.