Our dog Sandy has that when she was almost a year old. She kept throwing up and we kept taking her to the Vet until one night she threw up blood all over the kitchen, it looked like a murder had happened, there was blood covering half the floor and up on to some of the cabinets. We rushed her to the pet ER, she was there over night and then transfered to our Vet's clinic where she was for about 4 days.
She is now almost 12 years old and hasn't had a return of any problems like that. Good Luck to your dog, I hope she is feeling better soon.