[gjs/mozjs78: 2/17] js: Fix up declarations of mozilla::DefaultHasher




commit 1fce936fd3d42d8c2171aa4e6c27a55d936ef62a
Author: Evan Welsh <noreply evanwelsh com>
Date:   Sat Jul 4 22:11:07 2020 -0500

    js: Fix up declarations of mozilla::DefaultHasher
    
    This now has an extra template parameter, so the forward declaration
    would need to be changed. However, IWYU now thinks that we need to
    include the header file instead of having a forward declaration anyway,
    so just remove them.
    
    See: GNOME/gjs#329

 gi/boxed.h            | 5 +----
 gjs/context-private.h | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/gi/boxed.h b/gi/boxed.h
index a683d8d5..3cd9727d 100644
--- a/gi/boxed.h
+++ b/gi/boxed.h
@@ -36,6 +36,7 @@
 #include <js/Id.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
+#include <mozilla/HashTable.h>  // for DefaultHasher
 
 #include "gi/wrapperutils.h"
 #include "gjs/jsapi-util.h"
@@ -51,10 +52,6 @@ class CallArgs;
 namespace js {
 class SystemAllocPolicy;
 }
-namespace mozilla {
-template <class Key>
-struct DefaultHasher;
-}
 
 /* To conserve memory, we have two different kinds of private data for GBoxed
  * JS wrappers: BoxedInstance, and BoxedPrototype. Both inherit from BoxedBase
diff --git a/gjs/context-private.h b/gjs/context-private.h
index 44bc8308..f8524e84 100644
--- a/gjs/context-private.h
+++ b/gjs/context-private.h
@@ -43,6 +43,7 @@
 #include <js/ValueArray.h>
 #include <jsapi.h>        // for JS_GetContextPrivate
 #include <jsfriendapi.h>  // for ScriptEnvironmentPreparer
+#include <mozilla/HashTable.h>  // for DefaultHasher
 #include <mozilla/UniquePtr.h>
 
 #include "gjs/context.h"
@@ -50,10 +51,6 @@
 #include "gjs/macros.h"
 #include "gjs/profiler.h"
 
-namespace mozilla {
-template <class Key>
-struct DefaultHasher;
-}
 namespace js {
 class SystemAllocPolicy;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]