Evolutionary calculations are presented, in a spherically symmetric approximation, for a protoplanet of 1 Jovian mass with homogeneous solar composition during the early phase of quasi-static contraction prior to the dissociation of molecular hydrogen. In contrast to earlier calculations which assume that protoplanets are isolated, this study invokes a time-dependent surface boundary condition that simulates physical conditions in an evolving primitive solar nebula. In a first set of calculations the protoplanet is surrounded by a "thermal bath" whose temperature varies with time and whose pressure is small and constant in time. Under a wide range of parameters the result is evaporation and complete dispersal of the object. Conditions required for the protoplanet to survive are discussed. In a second set of calculations both the temperature and pressure at the surface vary with time according to models of the solar nebula. In this case the protoplanet is not dispersed, but the evolution is accelerated or retarded relative to that of an isolated protoplanet, depending upon whether the entropy in the nebula is lower than or higher than, respectively, the entropy in the outer layers of the protoplanet. Processes by which terrestrial planets can form in the cores of giant gaseous protoplanets are discussed.