diff options
Diffstat (limited to 'TAO/tao/MProfile.i')
-rw-r--r-- | TAO/tao/MProfile.i | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/TAO/tao/MProfile.i b/TAO/tao/MProfile.i index 1623cd10b18..d13887e406b 100644 --- a/TAO/tao/MProfile.i +++ b/TAO/tao/MProfile.i @@ -253,13 +253,19 @@ TAO_MProfile::add_profile (TAO_Profile *pfile) } ACE_INLINE void -TAO_MProfile::create_policy_list (CORBA::Environment &ACE_TRY_ENV) +TAO_MProfile::create_policy_list (void) { - ACE_NEW_THROW_EX (this->policy_list_, - CORBA::PolicyList, - CORBA::NO_MEMORY (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO) - ); + // Precondition: Make sure that the policy list + // has not already allocated. + ACE_ASSERT (this->policy_list_ == 0); + + ACE_NEW (this->policy_list_, CORBA::PolicyList ()); + + // Post-Condition: Make sure that the memory get allcated + // for real. + ACE_ASSERT (this->policy_list_ != 0); + + // @@ Marina & Irfan I would raise an exception in this case. } |