
Recently Beverly asked me about bird vomit. In particular she wanted to know if the "material" ejected by the birds when it is used as a defensive mechanism was the same "material" used to feed the young.
I did a bit of digging and found out that prey derived stomach oils are used both as an energy source as well as a defensive/offensive tool, at least for petrels, the family of birds most often associated with defensive projectile vomiting. Oils are produced by both adults and chicks and it is indeed fed to chicks by the adults. The chicks also produce the oils as well.
Birds have 3 stomach-like organs as part of their digestive system - the crop (generally for quick food storage in seed eating birds), the glandular stomach, and the muscular stomach (for grinding food). The crop and gizzard are generally reduced in petrels and most of the digestion is done in the glandular stomach. All petrels except diving petrels (Pelecanoididae) are know to produce stomach oils and the ability to projectile vomit those oils and stomach contents is most developed in those species that nest in the open on the ground, such as the Southern Giant Petrel, which I have photos of here.
The oils are derived from the prey items of each petrel species and are thought to afford petrels a high energy, low volume energy source composed most often of wax esters and triglycerides. These oils may also retard digestion of food items and thus enable petrels to assimilate food over longer periods, which is advantageous for birds whose prey are distributed in widely spaced patches or whose young often endure long periods of fasting between meals. The oils may also provide water for fasting chicks through the internal combustion of the oils.

These oils are apparently quite effective in deterring predation and have been know to result in death of predators, particular bird predators whose feathers become matted and loose insulating value potentially resulting in death through exposure. Diving petrels are thought to have not developed these oils because they tend to forage close to breeding areas and nest in burrows.
Although it might seem like the loss of these oils while vomiting them at a predator may be maladaptive, the loss of life would most certainly be a greater impact to an individual that a loss of a meal. The evolution of this behavior may have also benefited petrels by giving chicks a way to independently defend themselves allowing both parents to forage when the chicks are younger therefor providing more food earlier in the chicks life, and nesting sites can be in more open areas, thus allowing expansion into habitats otherwise not available.

The petrel that I have worked most closely with is the Southern Giant Petrel, arguably the bird most adept in the art of projectile vomiting. They are large birds, nearly the size of a turkey and have a correspondingly large stomach. When disturbed they can project their oils about 2 meters. We called it "gack" and I can vouch for the fact that it is very oily, stinky, and persistent. Giant petrels are also well known scavengers, so the projectile often contains more than just prey derived oils! Their bills are well adapted to scavenging with the lower mandible shaped much like a curved wood chisel well suited to jabbing into a carcass; the upper mandible is sharply pointed and hooked to then grab and tear out chunks of flesh to wolf down.

Despite being known as the Antarctic vulture with photos often taken of individuals head deep in a recently deceased seal, these birds can be remarkably endearing. The birds I worked with had become accustomed to having researchers visit their nests rather often and although some individuals never did get used to us, others were quite accommodating. Often we were able to gently approach a nest and reach under an incubating bird to rotate the band on the bird's leg so we could read all the numbers on the band. One of my favorites was a pure white bird that often tried to move me under her with insistent downward nudges of her bill on my arm so she could incubate me as well as her egg.
References:
Armstrong E. 1951. Discharge of oily fluid by young fulmars. Ibis 93:245-51.
Warham J. 1977. The incidence, functions and ecological significance of petrel stomach oils. Proceedings of the New Zealand Ecological Society 24:84-93