[Tizen] Remove guard codes for memory corruption 65/303465/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 28 Dec 2023 05:28:32 +0000 (14:28 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Thu, 28 Dec 2023 05:28:32 +0000 (14:28 +0900)
Change-Id: I3df3dbab64439505bb613495940d68c6e9370258
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/visuals/svg/svg-visual.cpp
dali-toolkit/internal/visuals/visual-base-impl.cpp
dali-toolkit/internal/visuals/visual-base-impl.h

index 5f9b299..2c02c7e 100644 (file)
@@ -76,14 +76,12 @@ SvgVisual::SvgVisual(VisualFactoryCache& factoryCache, ImageVisualShaderFactory&
   mLoadFailed(false),
   mAttemptAtlasing(false)
 {
-  DALI_LOG_RELEASE_INFO("SvgVisual is created: %p, mImpl : %p, url : %s\n", this, mImpl, mImageUrl.GetUrl().c_str());
   // the rasterized image is with pre-multiplied alpha format
   mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
 }
 
 SvgVisual::~SvgVisual()
 {
-  DALI_LOG_RELEASE_INFO("SvgVisual is destructed: %p, mImpl : %p, mLoadingTask : %p, mRasterizingTask : %p, url : %s\n", this, mImpl, mLoadingTask.Get(), mRasterizingTask.Get(), mImageUrl.GetUrl().c_str());
   if(Stage::IsInstalled())
   {
     if(mLoadingTask)
@@ -103,10 +101,6 @@ SvgVisual::~SvgVisual()
       textureManager.RemoveEncodedImageBuffer(mImageUrl.GetUrl());
     }
   }
-  else if(DALI_UNLIKELY(!Stage::IsShuttingDown()))
-  {
-    DALI_LOG_ERROR("SvgVisual maybe try to destruct on worker thread! %p, mLoadingTask : %p, mRasterizingTask : %p, url : %s\n", this, mLoadingTask.Get(), mRasterizingTask.Get(), mImageUrl.GetUrl().c_str());
-  }
 }
 
 void SvgVisual::OnInitialize()
@@ -368,12 +362,6 @@ void SvgVisual::AddRasterizationTask(const Vector2& size)
 
 void SvgVisual::ApplyRasterizedImage(SvgTaskPtr task)
 {
-  if(DALI_UNLIKELY(mImpl == nullptr))
-  {
-    DALI_LOG_ERROR("Fatal error!! already destroyed object callback called! SvgVisual : %p, task : %p\n", this, task.Get());
-    return;
-  }
-
   if(task->HasSucceeded())
   {
     PixelData rasterizedPixelData = task->GetPixelData();
index 3d765dc..a61519f 100644 (file)
@@ -159,13 +159,11 @@ Visual::Base::Base(VisualFactoryCache& factoryCache, FittingMode fittingMode, To
 : mImpl(new Impl(fittingMode, type)),
   mFactoryCache(factoryCache)
 {
-  mImplOrigin = mImpl;
 }
 
 Visual::Base::~Base()
 {
   delete mImpl;
-  mImpl = nullptr;
 }
 
 void Visual::Base::Initialize()
@@ -660,12 +658,6 @@ void Visual::Base::DoSetOffScene(Actor& actor)
 
 bool Visual::Base::IsOnScene() const
 {
-  if(DALI_UNLIKELY(mImplOrigin != mImpl))
-  {
-    DALI_LOG_ERROR("Fatal error!! Memory corruption occured! this : %p\n", this);
-    DALI_LOG_ERROR("mImpl : %p, mImplOrigin : %p\n", mImpl, mImplOrigin);
-    DALI_ASSERT_ALWAYS(false && "Visual::Base might got memory corruption!");
-  }
   return mImpl->mFlags & Impl::IS_ON_SCENE;
 }
 
index f03c64c..a4966a7 100644 (file)
@@ -511,7 +511,6 @@ private:
 protected:
   struct Impl;
   Impl*               mImpl;
-  Impl*               mImplOrigin{nullptr}; ///< Check for memory corruption
   VisualFactoryCache& mFactoryCache;
 };