Fix common unowned ptr exclusions in core/fxcrt

Convert T* pointers to another smart pointer type as flagged by
the compiler plugin.


Change-Id: Idd7ddd1561d0c5ae3dbabc645658d75c206fd97e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107133
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxcrt/autonuller.h b/core/fxcrt/autonuller.h
index 12df63f..88ae0cb 100644
--- a/core/fxcrt/autonuller.h
+++ b/core/fxcrt/autonuller.h
@@ -6,6 +6,7 @@
 #define CORE_FXCRT_AUTONULLER_H_
 
 #include "core/fxcrt/fx_memory.h"
+#include "core/fxcrt/unowned_ptr.h"
 
 namespace fxcrt {
 
@@ -22,7 +23,7 @@
   void AbandonNullification() { m_Location = nullptr; }
 
  private:
-  T* m_Location;
+  UnownedPtr<T> m_Location;
 };
 
 }  // namespace fxcrt
diff --git a/core/fxcrt/autorestorer.h b/core/fxcrt/autorestorer.h
index 02b5f3d..cecd0cd 100644
--- a/core/fxcrt/autorestorer.h
+++ b/core/fxcrt/autorestorer.h
@@ -6,6 +6,7 @@
 #define CORE_FXCRT_AUTORESTORER_H_
 
 #include "core/fxcrt/fx_memory.h"
+#include "core/fxcrt/unowned_ptr.h"
 
 namespace fxcrt {
 
@@ -23,7 +24,7 @@
   void AbandonRestoration() { m_Location = nullptr; }
 
  private:
-  T* m_Location;
+  UnownedPtr<T> m_Location;
   const T m_OldValue;
 };
 
diff --git a/core/fxcrt/scoped_set_insertion.h b/core/fxcrt/scoped_set_insertion.h
index 3a0ff0e..d930982 100644
--- a/core/fxcrt/scoped_set_insertion.h
+++ b/core/fxcrt/scoped_set_insertion.h
@@ -9,6 +9,7 @@
 #include <utility>
 
 #include "core/fxcrt/fx_memory.h"
+#include "core/fxcrt/unowned_ptr.h"
 #include "third_party/base/check.h"
 
 namespace fxcrt {
@@ -29,7 +30,7 @@
   ~ScopedSetInsertion() { set_->erase(insert_results_.first); }
 
  private:
-  std::set<T>* const set_;
+  UnownedPtr<std::set<T>> const set_;
   const std::pair<typename std::set<T>::iterator, bool> insert_results_;
 };