[gin] Rename gin::Wrappable to gin::DeprecatedWrappable

This is the first CL of a sequence of CLs to refactor gin::Wrappable
such that it is based on cppgc. In a follow-up CL we will re-introduce
`gin::Wrappable` again, and then port all uses from
`gin::DeprecatedWrappable` to `gin::Wrappable`.

BYPASS_LARGE_CHANGE_WARNING

Bug: 345640553
Change-Id: Iad028a1cec93aa8ade3b35c8099f8de5081f88fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6513641
Commit-Queue: Andreas Haas <[email protected]>
Reviewed-by: Michael Lippautz <[email protected]>
Owners-Override: Rick Byers <[email protected]>
Reviewed-by: Rick Byers <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1481539}
diff --git a/gin/per_isolate_data.h b/gin/per_isolate_data.h
index af23eaba..6ec87f63 100644
--- a/gin/per_isolate_data.h
+++ b/gin/per_isolate_data.h
@@ -25,7 +25,7 @@
 class V8IdleTaskRunner;
 class IndexedPropertyInterceptor;
 class NamedPropertyInterceptor;
-class WrappableBase;
+class DeprecatedWrappableBase;
 
 // There is one instance of PerIsolateData per v8::Isolate managed by Gin. This
 // class stores all the Gin-related data that varies per isolate.
@@ -57,33 +57,37 @@
   // Each isolate is associated with a collection of v8::ObjectTemplates and
   // v8::FunctionTemplates. Typically these template objects are created
   // lazily.
-  void SetObjectTemplate(WrapperInfo* info,
-                         v8::Local<v8::ObjectTemplate> object_template);
-  void SetFunctionTemplate(WrapperInfo* info,
+  void DeprecatedSetObjectTemplate(
+      DeprecatedWrapperInfo* info,
+      v8::Local<v8::ObjectTemplate> object_template);
+  void SetFunctionTemplate(DeprecatedWrapperInfo* info,
                            v8::Local<v8::FunctionTemplate> function_template);
 
   // These are low-level functions for retrieving object or function templates
   // stored in this object. Because these templates are often created lazily,
   // most clients should call higher-level functions that know how to populate
   // these templates if they haven't already been created.
-  v8::Local<v8::ObjectTemplate> GetObjectTemplate(WrapperInfo* info);
-  v8::Local<v8::FunctionTemplate> GetFunctionTemplate(WrapperInfo* info);
+  v8::Local<v8::ObjectTemplate> DeprecatedGetObjectTemplate(
+      DeprecatedWrapperInfo* info);
+  v8::Local<v8::FunctionTemplate> GetFunctionTemplate(
+      DeprecatedWrapperInfo* info);
 
   // We maintain a map from Wrappable objects that derive from one of the
   // interceptor interfaces to the interceptor interface pointers.
-  void SetIndexedPropertyInterceptor(WrappableBase* base,
+  void SetIndexedPropertyInterceptor(DeprecatedWrappableBase* base,
                                      IndexedPropertyInterceptor* interceptor);
-  void SetNamedPropertyInterceptor(WrappableBase* base,
+  void SetNamedPropertyInterceptor(DeprecatedWrappableBase* base,
                                    NamedPropertyInterceptor* interceptor);
 
-  void ClearIndexedPropertyInterceptor(WrappableBase* base,
+  void ClearIndexedPropertyInterceptor(DeprecatedWrappableBase* base,
                                        IndexedPropertyInterceptor* interceptor);
-  void ClearNamedPropertyInterceptor(WrappableBase* base,
+  void ClearNamedPropertyInterceptor(DeprecatedWrappableBase* base,
                                      NamedPropertyInterceptor* interceptor);
 
   IndexedPropertyInterceptor* GetIndexedPropertyInterceptor(
-      WrappableBase* base);
-  NamedPropertyInterceptor* GetNamedPropertyInterceptor(WrappableBase* base);
+      DeprecatedWrappableBase* base);
+  NamedPropertyInterceptor* GetNamedPropertyInterceptor(
+      DeprecatedWrappableBase* base);
 
   void AddDisposeObserver(DisposeObserver* observer);
   void RemoveDisposeObserver(DisposeObserver* observer);
@@ -103,14 +107,14 @@
   }
 
  private:
-  typedef std::map<
-      WrapperInfo*, v8::Eternal<v8::ObjectTemplate> > ObjectTemplateMap;
-  typedef std::map<
-      WrapperInfo*, v8::Eternal<v8::FunctionTemplate> > FunctionTemplateMap;
-  typedef std::map<WrappableBase*,
+  typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::ObjectTemplate>>
+      DeprecatedObjectTemplateMap;
+  typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::FunctionTemplate>>
+      FunctionTemplateMap;
+  typedef std::map<DeprecatedWrappableBase*,
                    raw_ptr<IndexedPropertyInterceptor, CtnExperimental>>
       IndexedPropertyInterceptorMap;
-  typedef std::map<WrappableBase*,
+  typedef std::map<DeprecatedWrappableBase*,
                    raw_ptr<NamedPropertyInterceptor, CtnExperimental>>
       NamedPropertyInterceptorMap;
 
@@ -118,7 +122,7 @@
   // owned by the IsolateHolder, which also owns the PerIsolateData.
   raw_ptr<v8::Isolate, AcrossTasksDanglingUntriaged> isolate_;
   raw_ptr<v8::ArrayBuffer::Allocator, DanglingUntriaged> allocator_;
-  ObjectTemplateMap object_templates_;
+  DeprecatedObjectTemplateMap deprecated_object_templates_;
   FunctionTemplateMap function_templates_;
   IndexedPropertyInterceptorMap indexed_interceptors_;
   NamedPropertyInterceptorMap named_interceptors_;