To be sure you might measure the phone's temperature with a battery app like Battery Monitor Widged, it provide a graph of temperature by time.
It shows the temperature of the phone's battery ... because it's the phone's most sensitive component therefore this is the temperature you might worry about.
Dont't worry about the processor's temperature, it's allowed temperature is far above the battery's
The Li-Ion battery's allowed temperature is for discharging up to +60C (+140F) and for charging up to +45C (+113F).
BTW, if the battery remains within its allowed range that means it doesn't represent any danger. But high temperatures will decrease the battery's life cycle span.