diff Framework/Messages/ICallable.h @ 975:e75fd08d6c75 toa2019083101

Cleaning in ICallable + changed fingerprint to plain char array to allow for dead object examination + additional check in FetchContext callback to avoid the unexplained rogue callbacks I have seen + protection in LoaderStateMachine::HandleSuccessMessage in case things go wrong anyway
author Benjamin Golinvaux <bgo@osimis.io>
date Sat, 31 Aug 2019 13:45:04 +0200
parents 38409549db43
children 262a0244e9b2
line wrap: on
line diff
--- a/Framework/Messages/ICallable.h	Thu Aug 29 18:08:48 2019 +0200
+++ b/Framework/Messages/ICallable.h	Sat Aug 31 13:45:04 2019 +0200
@@ -78,19 +78,15 @@
 
     void ApplyInternal(const TMessage& message)
     {
-#if 0
-      (observer_.*function_) (message);
-#else
       if (observerFingerprint_ != observer_.GetFingerprint())
       {
-        LOG(WARNING) << "The observer at address " << std::hex << &observer_ << std::dec << ") has a different fingerprint than the one recorded at callback registration time. Callback will NOT be sent!";
-        LOG(WARNING) << " recorded fingerprint = " << observerFingerprint_ << " current fingerprint = " << observer_.GetFingerprint();
+        LOG(TRACE) << "The observer at address " << std::hex << &observer_ << std::dec << ") has a different fingerprint than the one recorded at callback registration time. This means that it is not the same object as the one recorded, even though their addresses are the same.  Callback will NOT be sent!";
+        LOG(TRACE) << " recorded fingerprint = " << observerFingerprint_ << " current fingerprint = " << observer_.GetFingerprint();
       }
       else
       {
         (observer_.*function_) (message);
       }
-#endif
     }
 
     virtual void Apply(const IMessage& message)