most cookie dough in ice cream is safe to eat because the flour has been heat-treated and the eggs pasteurized, thus protecting you from such foodborne illnesses as e. coli and salmonella that could be found in homemade cookie dough. the same goes for slice-and-bake and prepackaged cookie doughs.