[gjs/mozjs91: 1/4] Fix IWYU




commit 8711bed9d92a0da256a0fe88cb062dc49210c254
Author: Evan Welsh <contact evanwelsh com>
Date:   Fri Aug 6 18:55:44 2021 -0700

    Fix IWYU

 gi/arg.cpp                  | 3 +++
 gi/boxed.cpp                | 3 +++
 gi/function.cpp             | 4 ++++
 gi/fundamental.cpp          | 2 ++
 gi/gerror.cpp               | 1 +
 gi/gobject.cpp              | 2 ++
 gi/gtype.cpp                | 1 +
 gi/ns.cpp                   | 2 ++
 gi/object.cpp               | 5 +++--
 gi/object.h                 | 1 -
 gi/param.cpp                | 1 +
 gi/private.cpp              | 1 -
 gi/repo.cpp                 | 4 ++++
 gi/value.cpp                | 3 ++-
 gi/wrapperutils.h           | 1 +
 gjs/byteArray.cpp           | 3 +--
 gjs/context-private.h       | 2 +-
 gjs/context.cpp             | 2 ++
 gjs/deprecation.cpp         | 1 -
 gjs/engine.cpp              | 1 +
 gjs/global.cpp              | 1 +
 gjs/importer.cpp            | 6 +++++-
 gjs/jsapi-dynamic-class.cpp | 4 ++--
 gjs/jsapi-util-error.cpp    | 1 +
 gjs/jsapi-util-string.cpp   | 3 ++-
 gjs/jsapi-util.cpp          | 3 +++
 gjs/module.cpp              | 7 ++++++-
 gjs/module.h                | 1 +
 gjs/stack.cpp               | 1 -
 modules/cairo-context.cpp   | 1 +
 modules/cairo-path.cpp      | 1 +
 modules/cairo-pattern.cpp   | 2 +-
 modules/cairo-surface.cpp   | 2 +-
 test/gjs-test-rooting.cpp   | 1 +
 34 files changed, 60 insertions(+), 17 deletions(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index ed8be377..d394acef 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -17,9 +17,12 @@
 #include <js/Array.h>
 #include <js/CharacterEncoding.h>
 #include <js/Conversions.h>
+#include <js/ErrorReport.h>         // for JS_ReportOutOfMemory
+#include <js/Exception.h>           // for AutoSaveExceptionState
 #include <js/GCVector.h>            // for RootedVector, MutableWrappedPtrOp...
 #include <js/PropertyDescriptor.h>  // for JSPROP_ENUMERATE
 #include <js/RootingAPI.h>
+#include <js/String.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index b7ac7d0c..20220e3b 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -15,8 +15,11 @@
 
 #include <js/CallArgs.h>
 #include <js/Class.h>
+#include <js/ErrorReport.h>
+#include <js/Exception.h>
 #include <js/GCHashTable.h>  // for GCHashMap
 #include <js/GCVector.h>     // for MutableWrappedPtrOperations
+#include <js/String.h>
 #include <js/TracingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
diff --git a/gi/function.cpp b/gi/function.cpp
index 9f74a257..f2f0ac9f 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -21,10 +21,14 @@
 #include <js/Array.h>
 #include <js/CallArgs.h>
 #include <js/Class.h>
+#include <js/ErrorReport.h>
+#include <js/Exception.h>
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_PERMANENT
 #include <js/PropertySpec.h>
 #include <js/Realm.h>  // for GetRealmFunctionPrototype
 #include <js/RootingAPI.h>
+#include <js/String.h>
 #include <js/TypeDecls.h>
 #include <js/Value.h>
 #include <js/ValueArray.h>
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index 2d80e9a9..80cecb69 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -10,7 +10,9 @@
 
 #include <js/AllocPolicy.h>  // for SystemAllocPolicy
 #include <js/Class.h>
+#include <js/ErrorReport.h>
 #include <js/GCHashTable.h>  // for WeakCache
+#include <js/Object.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index d3a2fb60..529c38d6 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -13,6 +13,7 @@
 
 #include <js/CallArgs.h>
 #include <js/Class.h>
+#include <js/Exception.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_ENUMERATE
 #include <js/RootingAPI.h>
 #include <js/SavedFrameAPI.h>
diff --git a/gi/gobject.cpp b/gi/gobject.cpp
index b98af177..696e1187 100644
--- a/gi/gobject.cpp
+++ b/gi/gobject.cpp
@@ -11,11 +11,13 @@
 #include <glib.h>
 
 #include <js/PropertyDescriptor.h>  // for JSPROP_READONLY
+#include <js/Realm.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Value.h>
 #include <js/ValueArray.h>
 #include <jsapi.h>  // for JS_New, JSAutoRealm, JS_GetProperty
+#include <mozilla/Maybe.h>
 
 #include "gi/gobject.h"
 #include "gi/object.h"
diff --git a/gi/gtype.cpp b/gi/gtype.cpp
index 28eb0acd..d6589250 100644
--- a/gi/gtype.cpp
+++ b/gi/gtype.cpp
@@ -12,6 +12,7 @@
 #include <js/CallArgs.h>
 #include <js/Class.h>
 #include <js/GCHashTable.h>         // for WeakCache
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_PERMANENT
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
diff --git a/gi/ns.cpp b/gi/ns.cpp
index f14d4d21..8f09fca8 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -10,7 +10,9 @@
 #include <js/CallArgs.h>
 #include <js/Class.h>
 #include <js/ComparisonOperators.h>
+#include <js/ErrorReport.h>
 #include <js/Id.h>
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_READONLY
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
diff --git a/gi/object.cpp b/gi/object.cpp
index c05804c1..ffe76881 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -13,7 +13,6 @@
 #include <limits>
 #include <string>
 #include <tuple>        // for tie
-#include <type_traits>
 #include <unordered_set>
 #include <utility>      // for move
 #include <vector>
@@ -27,10 +26,12 @@
 #include <js/CharacterEncoding.h>
 #include <js/Class.h>
 #include <js/ComparisonOperators.h>
+#include <js/ErrorReport.h>
 #include <js/GCAPI.h>               // for JS_AddWeakPointerCompartmentCallback
 #include <js/GCVector.h>            // for MutableWrappedPtrOperations
 #include <js/HeapAPI.h>
 #include <js/MemoryFunctions.h>     // for AddAssociatedMemory, RemoveAssoci...
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_PERMANENT, JSPROP_READONLY
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
@@ -38,7 +39,7 @@
 #include <js/ValueArray.h>
 #include <js/Warnings.h>
 #include <jsapi.h>        // for JS_ReportOutOfMemory, IsCallable
-#include <jsfriendapi.h>  // for JS_GetObjectFunction, IsFunctionO...
+#include <jsfriendapi.h>
 #include <mozilla/HashTable.h>
 
 #include "gi/arg-inl.h"
diff --git a/gi/object.h b/gi/object.h
index 6367663d..44b1b965 100644
--- a/gi/object.h
+++ b/gi/object.h
@@ -23,7 +23,6 @@
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
-#include <jsfriendapi.h>
 #include <mozilla/HashFunctions.h>  // for HashGeneric, HashNumber
 #include <mozilla/Likely.h>         // for MOZ_LIKELY
 
diff --git a/gi/param.cpp b/gi/param.cpp
index cc903a73..07429a8c 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -9,6 +9,7 @@
 
 #include <js/CallArgs.h>
 #include <js/Class.h>
+#include <js/Object.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
diff --git a/gi/private.cpp b/gi/private.cpp
index 7029d215..995bb77e 100644
--- a/gi/private.cpp
+++ b/gi/private.cpp
@@ -12,7 +12,6 @@
 
 #include <js/Array.h>  // for JS::GetArrayLength,
 #include <js/CallArgs.h>
-#include <js/Id.h>
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
diff --git a/gi/repo.cpp b/gi/repo.cpp
index df78f263..a0827ad2 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -15,11 +15,15 @@
 #include <glib-object.h>
 #include <glib.h>
 
+#include <js/CharacterEncoding.h>  // IWYU pragma: keep
 #include <js/Class.h>
 #include <js/ComparisonOperators.h>
+#include <js/Exception.h>
 #include <js/Id.h>                  // for JSID_VOID
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_PERMANENT, JSPROP_RESOLVING
 #include <js/RootingAPI.h>
+#include <js/String.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>
diff --git a/gi/value.cpp b/gi/value.cpp
index d1a10182..b7f4a07f 100644
--- a/gi/value.cpp
+++ b/gi/value.cpp
@@ -15,7 +15,9 @@
 
 #include <js/CharacterEncoding.h>
 #include <js/Conversions.h>
+#include <js/Exception.h>
 #include <js/GCVector.h>  // for RootedVector
+#include <js/Realm.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
@@ -23,7 +25,6 @@
 #include <js/ValueArray.h>
 #include <js/experimental/TypedData.h>
 #include <jsapi.h>  // for InformalValueTypeName, JS_ClearPendingException
-#include <jsfriendapi.h>
 
 #include "gi/arg-inl.h"
 #include "gi/arg.h"
diff --git a/gi/wrapperutils.h b/gi/wrapperutils.h
index e5dba017..f70ea6d1 100644
--- a/gi/wrapperutils.h
+++ b/gi/wrapperutils.h
@@ -20,6 +20,7 @@
 #include <js/ComparisonOperators.h>
 #include <js/Id.h>
 #include <js/MemoryFunctions.h>
+#include <js/Object.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <jsapi.h>       // for JS::GetPrivate, JS::SetPrivate, JS_Ge...
diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index 453e059a..e8c94f25 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -13,7 +13,7 @@
 
 #include <js/ArrayBuffer.h>
 #include <js/CallArgs.h>
-#include <js/CharacterEncoding.h>
+#include <js/CharacterEncoding.h>  // IWYU pragma: keep
 #include <js/GCAPI.h>  // for AutoCheckCannotGC
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
@@ -22,7 +22,6 @@
 #include <js/Utility.h>  // for UniqueChars
 #include <js/experimental/TypedData.h>
 #include <jsapi.h>        // for JS_DefineFunctionById, JS_DefineFun...
-#include <jsfriendapi.h>  // for JS_NewUint8ArrayWithBuffer, GetUint...
 
 #include "gi/boxed.h"
 #include "gjs/atoms.h"
diff --git a/gjs/context-private.h b/gjs/context-private.h
index e29b495c..656763e9 100644
--- a/gjs/context-private.h
+++ b/gjs/context-private.h
@@ -20,6 +20,7 @@
 #include <glib-object.h>
 #include <glib.h>
 
+#include <js/Context.h>
 #include <js/GCAPI.h>
 #include <js/GCHashTable.h>
 #include <js/GCVector.h>
@@ -29,7 +30,6 @@
 #include <js/TypeDecls.h>
 #include <js/UniquePtr.h>
 #include <js/ValueArray.h>
-#include <jsapi.h>        // for JS_GetContextPrivate
 #include <jsfriendapi.h>  // for ScriptEnvironmentPreparer
 
 #include "gi/closure.h"
diff --git a/gjs/context.cpp b/gjs/context.cpp
index ea4dc7d4..cc7378f0 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -40,6 +40,7 @@
 #include <js/CharacterEncoding.h>
 #include <js/CompilationAndEvaluation.h>
 #include <js/CompileOptions.h>
+#include <js/Context.h>
 #include <js/ErrorReport.h>
 #include <js/Exception.h>           // for StealPendingExceptionStack
 #include <js/GCAPI.h>               // for JS_GC, JS_AddExtraGCRootsTr...
@@ -49,6 +50,7 @@
 #include <js/Modules.h>
 #include <js/Promise.h>             // for JobQueue::SavedJobQueue
 #include <js/PropertyDescriptor.h>  // for JSPROP_PERMANENT, JSPROP_RE...
+#include <js/Realm.h>
 #include <js/RootingAPI.h>
 #include <js/SourceText.h>
 #include <js/TracingAPI.h>
diff --git a/gjs/deprecation.cpp b/gjs/deprecation.cpp
index 6d313983..338be730 100644
--- a/gjs/deprecation.cpp
+++ b/gjs/deprecation.cpp
@@ -21,7 +21,6 @@
 #include <js/Value.h>
 #include <js/friend/DumpFunctions.h>
 #include <jsapi.h>        // for MaxFrames, CaptureCurrentStack
-#include <jsfriendapi.h>  // for FormatStackDump
 
 #include "gjs/deprecation.h"
 #include "gjs/jsapi-util.h"  // IWYU pragma: keep
diff --git a/gjs/engine.cpp b/gjs/engine.cpp
index b1991e7b..659f37db 100644
--- a/gjs/engine.cpp
+++ b/gjs/engine.cpp
@@ -15,6 +15,7 @@
 #include <gio/gio.h>
 #include <glib.h>
 
+#include <js/Context.h>
 #include <js/ContextOptions.h>
 #include <js/GCAPI.h>           // for JS_SetGCParameter, JS_AddFin...
 #include <js/Initialization.h>  // for JS_Init, JS_ShutDown
diff --git a/gjs/global.cpp b/gjs/global.cpp
index 5b5ef860..be68cad0 100644
--- a/gjs/global.cpp
+++ b/gjs/global.cpp
@@ -17,6 +17,7 @@
 #include <js/CompilationAndEvaluation.h>
 #include <js/CompileOptions.h>
 #include <js/Id.h>
+#include <js/MapAndSet.h>
 #include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_PERMANENT, JSPROP_RE...
 #include <js/PropertySpec.h>
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 7b48dad6..c5aa1733 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -11,7 +11,6 @@
 #endif
 
 #include <string>
-#include <utility>  // for move
 #include <vector>   // for vector
 
 #include <gio/gio.h>
@@ -23,16 +22,21 @@
 #include <js/CharacterEncoding.h>
 #include <js/Class.h>
 #include <js/ComparisonOperators.h>
+#include <js/ErrorReport.h>
+#include <js/Exception.h>
 #include <js/Id.h>  // for PropertyKey
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
+#include <js/String.h>
 #include <js/Symbol.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>
 #include <jsapi.h>    // for JS_DefinePropertyById, JS_DefineP...
 #include <jspubtd.h>  // for JSProto_Error
+#include <mozilla/Maybe.h>
 #include <mozilla/UniquePtr.h>
 
 #include "gjs/atoms.h"
diff --git a/gjs/jsapi-dynamic-class.cpp b/gjs/jsapi-dynamic-class.cpp
index 038bd0db..18440b58 100644
--- a/gjs/jsapi-dynamic-class.cpp
+++ b/gjs/jsapi-dynamic-class.cpp
@@ -12,14 +12,14 @@
 #include <js/CallArgs.h>  // for JSNative
 #include <js/Class.h>
 #include <js/ComparisonOperators.h>
-#include <js/PropertyDescriptor.h>
+#include <js/Object.h>
 #include <js/Realm.h>  // for GetRealmObjectPrototype
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Value.h>
 #include <js/ValueArray.h>
 #include <jsapi.h>        // for JS_DefineFunctions, JS_DefineProp...
-#include <jsfriendapi.h>  // for GetFunctionNativeReserved, NewFun...
+#include <jsfriendapi.h>
 #include <jspubtd.h>      // for JSProto_TypeError
 
 #include "gjs/atoms.h"
diff --git a/gjs/jsapi-util-error.cpp b/gjs/jsapi-util-error.cpp
index 835a81b3..651dfa4f 100644
--- a/gjs/jsapi-util-error.cpp
+++ b/gjs/jsapi-util-error.cpp
@@ -10,6 +10,7 @@
 
 #include <js/CharacterEncoding.h>
 #include <js/ErrorReport.h>
+#include <js/Exception.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index 4e9fe51a..cfc4ac0d 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -19,9 +19,10 @@
 #include <js/BigInt.h>
 #include <js/CharacterEncoding.h>
 #include <js/Class.h>
-#include <js/ComparisonOperators.h>
+#include <js/ErrorReport.h>
 #include <js/GCAPI.h>  // for AutoCheckCannotGC
 #include <js/Id.h>
+#include <js/Object.h>
 #include <js/Promise.h>
 #include <js/RootingAPI.h>
 #include <js/String.h>
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index ce49bc1f..e702c9a2 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -24,9 +24,12 @@
 #include <js/Class.h>
 #include <js/Conversions.h>
 #include <js/ErrorReport.h>
+#include <js/Exception.h>
 #include <js/GCAPI.h>     // for JS_MaybeGC, NonIncrementalGC, GCRe...
 #include <js/GCVector.h>  // for RootedVector
+#include <js/Object.h>
 #include <js/RootingAPI.h>
+#include <js/String.h>
 #include <js/TypeDecls.h>
 #include <js/Value.h>
 #include <js/ValueArray.h>
diff --git a/gjs/module.cpp b/gjs/module.cpp
index e6d3d63b..db4a7679 100644
--- a/gjs/module.cpp
+++ b/gjs/module.cpp
@@ -19,11 +19,15 @@
 #include <js/CompilationAndEvaluation.h>
 #include <js/CompileOptions.h>
 #include <js/Conversions.h>
+#include <js/ErrorReport.h>
+#include <js/Exception.h>
 #include <js/GCVector.h>  // for RootedVector
 #include <js/Id.h>
 #include <js/Modules.h>
+#include <js/Object.h>
 #include <js/Promise.h>
 #include <js/PropertyDescriptor.h>
+#include <js/Realm.h>
 #include <js/RootingAPI.h>
 #include <js/SourceText.h>
 #include <js/String.h>
@@ -31,8 +35,9 @@
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>
 #include <js/ValueArray.h>
-#include <jsapi.h>  // for JS_DefinePropertyById, ...
+#include <jsapi.h>        // for JS_DefinePropertyById, ...
 #include <jsfriendapi.h>  // for SetFunctionNativeReserved
+#include <mozilla/Maybe.h>
 
 #include "gjs/atoms.h"
 #include "gjs/context-private.h"
diff --git a/gjs/module.h b/gjs/module.h
index f50d6eda..c20ef54e 100644
--- a/gjs/module.h
+++ b/gjs/module.h
@@ -9,6 +9,7 @@
 
 #include <gio/gio.h>
 
+#include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 
 #include "gjs/macros.h"
diff --git a/gjs/stack.cpp b/gjs/stack.cpp
index 46aab583..6bbb2469 100644
--- a/gjs/stack.cpp
+++ b/gjs/stack.cpp
@@ -11,7 +11,6 @@
 
 #include <js/TypeDecls.h>
 #include <js/friend/DumpFunctions.h>
-#include <jsfriendapi.h>  // for DumpBacktrace
 
 #include "gjs/context.h"
 #include "gjs/jsapi-util.h"
diff --git a/modules/cairo-context.cpp b/modules/cairo-context.cpp
index d1176481..d6899622 100644
--- a/modules/cairo-context.cpp
+++ b/modules/cairo-context.cpp
@@ -13,6 +13,7 @@
 #include <js/Array.h>  // for JS::NewArrayObject
 #include <js/CallArgs.h>
 #include <js/Conversions.h>
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_READONLY
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
diff --git a/modules/cairo-path.cpp b/modules/cairo-path.cpp
index e581f9c1..76a879df 100644
--- a/modules/cairo-path.cpp
+++ b/modules/cairo-path.cpp
@@ -8,6 +8,7 @@
 #include <cairo.h>
 #include <glib.h>  // for g_assert
 
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_READONLY
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
diff --git a/modules/cairo-pattern.cpp b/modules/cairo-pattern.cpp
index a7097520..29bf6926 100644
--- a/modules/cairo-pattern.cpp
+++ b/modules/cairo-pattern.cpp
@@ -9,11 +9,11 @@
 
 #include <js/CallArgs.h>
 #include <js/Class.h>
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_READONLY
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
-#include <jsapi.h>  // for JS::GetPrivate, JS::GetClass, ...
 
 #include "gjs/jsapi-class.h"
 #include "gjs/jsapi-util.h"
diff --git a/modules/cairo-surface.cpp b/modules/cairo-surface.cpp
index 3e33d37c..f86402cb 100644
--- a/modules/cairo-surface.cpp
+++ b/modules/cairo-surface.cpp
@@ -10,12 +10,12 @@
 
 #include <js/CallArgs.h>
 #include <js/Class.h>
+#include <js/Object.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_READONLY
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Value.h>
-#include <jsapi.h>  // for JS::GetPrivate, JS::GetClass, ...
 
 #include "gi/arg-inl.h"
 #include "gi/arg.h"
diff --git a/test/gjs-test-rooting.cpp b/test/gjs-test-rooting.cpp
index 380e80f7..f2244f59 100644
--- a/test/gjs-test-rooting.cpp
+++ b/test/gjs-test-rooting.cpp
@@ -7,6 +7,7 @@
 
 #include <js/Class.h>
 #include <js/GCAPI.h>  // for JS_GC, JS_SetGCCallback, JSGCStatus
+#include <js/Object.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Value.h>


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