[gjs/mozjs91: 120/135] js: Update includes for headers split out of JSAPI




commit 1d4394c93c354978ee33df4bf03f17dec379a24a
Author: Evan Welsh <contact evanwelsh com>
Date:   Sat Jul 10 19:50:43 2021 -0700

    js: Update includes for headers split out of JSAPI
    
    Added
    - js/experimental/TypedData.h
    - js/friend/DumpFunctions.h
    - js/Context.h
    - js/MapAndSet.h
    - js/String.h
    
    Updated
    - js/ErrorReport.h
    - js/Exception.h
    - js/GCAPI.h
    - js/Realm.h
    
    Removed
    - js/RequiredDefines.h
    
    See https://bugzilla.mozilla.org/show_bug.cgi?id=1708330
    See https://bugzilla.mozilla.org/show_bug.cgi?id=1656411
    See https://bugzilla.mozilla.org/show_bug.cgi?id=1663365

 gi/arg-cache.cpp            | 1 +
 gi/arg.cpp                  | 6 +++++-
 gi/boxed.cpp                | 5 ++++-
 gi/closure.cpp              | 1 +
 gi/function.cpp             | 3 +++
 gi/fundamental.cpp          | 1 +
 gi/gerror.cpp               | 1 +
 gi/gobject.cpp              | 3 ++-
 gi/ns.cpp                   | 1 +
 gi/object.cpp               | 3 ++-
 gi/repo.cpp                 | 2 ++
 gi/value.cpp                | 6 ++++--
 gjs/atoms.cpp               | 2 +-
 gjs/byteArray.cpp           | 2 +-
 gjs/context-private.h       | 2 +-
 gjs/context.cpp             | 7 +++++--
 gjs/coverage.cpp            | 4 ++--
 gjs/debugger.cpp            | 4 +++-
 gjs/deprecation.cpp         | 2 +-
 gjs/engine.cpp              | 1 +
 gjs/gjs_pch.hh              | 6 +++++-
 gjs/global.cpp              | 1 +
 gjs/importer.cpp            | 3 +++
 gjs/jsapi-util-args.h       | 2 +-
 gjs/jsapi-util-error.cpp    | 3 ++-
 gjs/jsapi-util-root.h       | 1 +
 gjs/jsapi-util-string.cpp   | 5 +++--
 gjs/jsapi-util.cpp          | 4 +++-
 gjs/module.cpp              | 4 ++++
 gjs/stack.cpp               | 2 +-
 gjs/text-encoding.cpp       | 5 +++--
 modules/print.cpp           | 1 +
 modules/system.cpp          | 3 ++-
 test/gjs-test-call-args.cpp | 1 +
 test/gjs-test-common.cpp    | 2 +-
 test/gjs-test-utils.cpp     | 2 +-
 test/gjs-tests.cpp          | 2 ++
 37 files changed, 77 insertions(+), 27 deletions(-)
---
diff --git a/gi/arg-cache.cpp b/gi/arg-cache.cpp
index f4d8136e..4ac45e54 100644
--- a/gi/arg-cache.cpp
+++ b/gi/arg-cache.cpp
@@ -20,6 +20,7 @@
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>
+#include <js/experimental/TypedData.h>
 #include <jsapi.h>        // for JS_TypeOfValue
 #include <jsfriendapi.h>  // for JS_GetObjectFunction
 #include <jspubtd.h>      // for JSTYPE_FUNCTION
diff --git a/gi/arg.cpp b/gi/arg.cpp
index 195e060a..d27f1666 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -17,15 +17,19 @@
 #include <js/Array.h>
 #include <js/CharacterEncoding.h>
 #include <js/Conversions.h>
+#include <js/ErrorReport.h>  // for JS_ReportOutOfMemory
+#include <js/Exception.h>
 #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>
 #include <js/ValueArray.h>
+#include <js/experimental/TypedData.h>
 #include <jsapi.h>        // for JS_ReportOutOfMemory, JS_GetElement
-#include <jsfriendapi.h>  // for JS_IsUint8Array, JS_GetObjectFunc...
+#include <jsfriendapi.h>  // for JS_GetObjectFunction
 
 #include "gi/arg-inl.h"
 #include "gi/arg-types-inl.h"
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 531544df..68dc9190 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -15,14 +15,17 @@
 
 #include <js/CallArgs.h>
 #include <js/Class.h>
+#include <js/ErrorReport.h>  // for JS_ReportOutOfMemory
+#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
 #include <js/Value.h>
 #include <js/ValueArray.h>
-#include <jsapi.h>  // for IdVector, JS_AtomizeAndPinJSString
+#include <jsapi.h>  // for IdVector
 #include <mozilla/HashTable.h>
 
 #include "gi/arg-cache.h"
diff --git a/gi/closure.cpp b/gi/closure.cpp
index 8647e956..1981d1da 100644
--- a/gi/closure.cpp
+++ b/gi/closure.cpp
@@ -8,6 +8,7 @@
 
 #include <glib.h>  // for g_assert
 
+#include <js/Realm.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/ValueArray.h>
diff --git a/gi/function.cpp b/gi/function.cpp
index da060607..2c549203 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -21,10 +21,13 @@
 #include <js/Array.h>
 #include <js/CallArgs.h>
 #include <js/Class.h>
+#include <js/ErrorReport.h>  // for JS_ReportOutOfMemory
+#include <js/Exception.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 72b69259..79bfc9b2 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -10,6 +10,7 @@
 
 #include <js/AllocPolicy.h>  // for SystemAllocPolicy
 #include <js/Class.h>
+#include <js/ErrorReport.h>  // for JS_ReportOutOfMemory
 #include <js/GCHashTable.h>  // for WeakCache
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index 2e62cddb..0a9ad89c 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 d6501624..b9247781 100644
--- a/gi/gobject.cpp
+++ b/gi/gobject.cpp
@@ -11,11 +11,12 @@
 #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 <jsapi.h>  // for JS_SetProperty, JS_DefineProperty
 
 #include "gi/gobject.h"
 #include "gi/object.h"
diff --git a/gi/ns.cpp b/gi/ns.cpp
index 552afe0b..714e5b34 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -10,6 +10,7 @@
 #include <js/CallArgs.h>
 #include <js/Class.h>
 #include <js/ComparisonOperators.h>
+#include <js/ErrorReport.h>  // for JS_ReportOutOfMemory
 #include <js/Id.h>
 #include <js/PropertyDescriptor.h>  // for JSPROP_READONLY
 #include <js/PropertySpec.h>
diff --git a/gi/object.cpp b/gi/object.cpp
index 593fa7cb..54740990 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -27,6 +27,7 @@
 #include <js/CharacterEncoding.h>
 #include <js/Class.h>
 #include <js/ComparisonOperators.h>
+#include <js/ErrorReport.h>         // for JS_ReportOutOfMemory
 #include <js/GCAPI.h>               // for JS_AddWeakPointerCompartmentCallback
 #include <js/GCVector.h>            // for MutableWrappedPtrOperations
 #include <js/HeapAPI.h>
@@ -37,7 +38,7 @@
 #include <js/Value.h>
 #include <js/ValueArray.h>
 #include <js/Warnings.h>
-#include <jsapi.h>        // for JS_ReportOutOfMemory, IsCallable
+#include <jsapi.h>        // for IsCallable
 #include <jsfriendapi.h>  // for JS_GetObjectFunction, IsFunctionO...
 #include <mozilla/HashTable.h>
 
diff --git a/gi/repo.cpp b/gi/repo.cpp
index cd4f843d..5a97f234 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -22,9 +22,11 @@ class UTF8Chars;        // IWYU pragma: keep
 
 #include <js/Class.h>
 #include <js/ComparisonOperators.h>
+#include <js/Exception.h>
 #include <js/Id.h>                  // for JSID_VOID
 #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 af1f6702..96f5cf8d 100644
--- a/gi/value.cpp
+++ b/gi/value.cpp
@@ -15,14 +15,16 @@
 
 #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
 #include <js/Value.h>
 #include <js/ValueArray.h>
-#include <jsapi.h>  // for InformalValueTypeName, JS_ClearPendingException
-#include <jsfriendapi.h>
+#include <js/experimental/TypedData.h>
+#include <jsapi.h>  // for InformalValueTypeName, JS_Get...
 
 #include "gi/arg-inl.h"
 #include "gi/arg.h"
diff --git a/gjs/atoms.cpp b/gjs/atoms.cpp
index 807f6848..8a75beb4 100644
--- a/gjs/atoms.cpp
+++ b/gjs/atoms.cpp
@@ -14,10 +14,10 @@ class UTF8Chars;        // IWYU pragma: keep
 
 #include <js/Id.h>
 #include <js/RootingAPI.h>
+#include <js/String.h>
 #include <js/Symbol.h>
 #include <js/TracingAPI.h>
 #include <js/TypeDecls.h>
-#include <jsapi.h>  // for JS_AtomizeAndPinString
 
 #include "gjs/atoms.h"
 #include "gjs/jsapi-util.h"  // IWYU pragma: keep
diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index e3afc11c..40a9d243 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -16,8 +16,8 @@
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #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 75b04bf0..bdbd35c7 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 734ac68d..349bd3a1 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>
@@ -56,8 +58,9 @@
 #include <js/UniquePtr.h>
 #include <js/Value.h>
 #include <js/ValueArray.h>
-#include <jsapi.h>        // for JS_IsExceptionPending, ...
-#include <jsfriendapi.h>  // for DumpHeap, IgnoreNurseryObjects
+#include <js/friend/DumpFunctions.h>
+#include <jsapi.h>        // for Call, CurrentGlobalOrNull
+#include <jsfriendapi.h>  // for ScriptEnvironmentPreparer
 #include <mozilla/UniquePtr.h>
 
 #include "gi/closure.h"  // for Closure::Ptr, Closure
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index 924ef376..7dcc20db 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -14,14 +14,14 @@
 #include <glib-object.h>
 
 #include <js/GCAPI.h>  // for JS_AddExtraGCRootsTracer, JS_Remove...
+#include <js/Realm.h>
 #include <js/RootingAPI.h>
 #include <js/TracingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>
 #include <js/experimental/CodeCoverage.h>  // for EnableCodeCoverage
-#include <jsapi.h>        // for JSAutoRealm, JS_SetPropertyById
-#include <jsfriendapi.h>  // for GetCodeCoverageSummary
+#include <jsapi.h>                         // for JS_SetPropertyById
 
 #include "gjs/atoms.h"
 #include "gjs/context-private.h"
diff --git a/gjs/debugger.cpp b/gjs/debugger.cpp
index 7442c082..039c3070 100644
--- a/gjs/debugger.cpp
+++ b/gjs/debugger.cpp
@@ -21,11 +21,13 @@ class UTF8Chars;        // IWYU pragma: keep
 
 #include <js/CallArgs.h>
 #include <js/PropertySpec.h>
+#include <js/Realm.h>
 #include <js/RootingAPI.h>
+#include <js/String.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>
-#include <jsapi.h>  // for JS_DefineFunctions, JS_NewStringCopyZ
+#include <jsapi.h>  // for JS_DefineFunctions, JS_SetPropertyById
 
 #include "gjs/atoms.h"
 #include "gjs/context-private.h"
diff --git a/gjs/deprecation.cpp b/gjs/deprecation.cpp
index 3fdd64d4..338be730 100644
--- a/gjs/deprecation.cpp
+++ b/gjs/deprecation.cpp
@@ -19,8 +19,8 @@
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #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 0977bca8..253c546e 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/gjs_pch.hh b/gjs/gjs_pch.hh
index cee7471c..be31fd0d 100644
--- a/gjs/gjs_pch.hh
+++ b/gjs/gjs_pch.hh
@@ -48,7 +48,6 @@
 #endif
 #include <inttypes.h>
 #include <iomanip>
-#include <js/RequiredDefines.h>  // check-pch: ignore, part of mozjs cflags
 #include <js/AllocPolicy.h>
 #include <js/Array.h>
 #include <js/ArrayBuffer.h>
@@ -59,6 +58,7 @@
 #include <js/ComparisonOperators.h>
 #include <js/CompilationAndEvaluation.h>
 #include <js/CompileOptions.h>
+#include <js/Context.h>
 #include <js/ContextOptions.h>
 #include <js/Conversions.h>
 #include <js/ErrorReport.h>
@@ -71,6 +71,7 @@
 #include <js/HeapAPI.h>
 #include <js/Id.h>
 #include <js/Initialization.h>
+#include <js/MapAndSet.h>
 #include <js/MemoryFunctions.h>
 #include <js/Modules.h>
 #include <js/ProfilingCategory.h>
@@ -83,6 +84,7 @@
 #include <js/RootingAPI.h>
 #include <js/SavedFrameAPI.h>
 #include <js/SourceText.h>
+#include <js/String.h>
 #include <js/Symbol.h>
 #include <js/TracingAPI.h>
 #include <js/TypeDecls.h>
@@ -94,6 +96,8 @@
 #include <js/Wrapper.h>
 #include <js/experimental/CodeCoverage.h>
 #include <js/experimental/SourceHook.h>
+#include <js/experimental/TypedData.h>
+#include <js/friend/DumpFunctions.h>
 #include <jsapi.h>
 #include <jsfriendapi.h>
 #include <jspubtd.h>
diff --git a/gjs/global.cpp b/gjs/global.cpp
index 1883c445..c6f28a67 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/PropertyDescriptor.h>  // for JSPROP_PERMANENT, JSPROP_RE...
 #include <js/PropertySpec.h>
 #include <js/Realm.h>  // for GetObjectRealmOrNull, SetRealmPrivate
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 0dbb2b6e..61374511 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -23,10 +23,13 @@
 #include <js/CharacterEncoding.h>
 #include <js/Class.h>
 #include <js/ComparisonOperators.h>
+#include <js/ErrorReport.h>  // for JS_ReportOutOfMemory
+#include <js/Exception.h>
 #include <js/Id.h>  // for PropertyKey
 #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
diff --git a/gjs/jsapi-util-args.h b/gjs/jsapi-util-args.h
index 576d638d..a114b06e 100644
--- a/gjs/jsapi-util-args.h
+++ b/gjs/jsapi-util-args.h
@@ -17,10 +17,10 @@
 
 #include <js/CallArgs.h>
 #include <js/Conversions.h>
+#include <js/Exception.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
-#include <jsapi.h>  // for JS_ClearPendingException
 
 #include "gjs/jsapi-util.h"
 #include "gjs/macros.h"
diff --git a/gjs/jsapi-util-error.cpp b/gjs/jsapi-util-error.cpp
index 70a060c4..781c4dce 100644
--- a/gjs/jsapi-util-error.cpp
+++ b/gjs/jsapi-util-error.cpp
@@ -10,11 +10,12 @@
 
 #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
 #include <js/ValueArray.h>
-#include <jsapi.h>       // for JS_ReportErrorUTF8, BuildStackString
+#include <jsapi.h>       // for BuildStackString, Construct, JS_GetClassObject
 #include <jspubtd.h>     // for JSProtoKey, JSProto_Error, JSProto...
 
 #include "gjs/atoms.h"
diff --git a/gjs/jsapi-util-root.h b/gjs/jsapi-util-root.h
index 6758c722..ee67addc 100644
--- a/gjs/jsapi-util-root.h
+++ b/gjs/jsapi-util-root.h
@@ -18,6 +18,7 @@
 #include <glib-object.h>
 #include <glib.h>
 
+#include <js/GCAPI.h>
 #include <js/TracingAPI.h>
 #include <js/TypeDecls.h>
 
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index 1d510058..9aa42b2e 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -19,6 +19,7 @@
 #include <js/BigInt.h>
 #include <js/CharacterEncoding.h>
 #include <js/Class.h>
+#include <js/ErrorReport.h>
 #include <js/GCAPI.h>  // for AutoCheckCannotGC
 #include <js/Id.h>
 #include <js/Promise.h>
@@ -27,8 +28,8 @@
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>
-#include <jsapi.h>        // for JSID_TO_FLAT_STRING, JS_GetTwoByte...
-#include <jsfriendapi.h>  // for FlatStringToLinearString, GetLatin...
+#include <jsapi.h>        // for JS_GetFunctionDisplayId
+#include <jsfriendapi.h>  // for IdToValue, IsFunctionObject, ...
 #include <mozilla/CheckedInt.h>
 
 #include "gjs/jsapi-util.h"
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 6f2df2cd..a0fbe0e7 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -22,13 +22,15 @@
 #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/RootingAPI.h>
+#include <js/String.h>
 #include <js/TypeDecls.h>
 #include <js/Value.h>
 #include <js/ValueArray.h>
-#include <jsapi.h>        // for JS_GetPropertyById, JS_ClearPendin...
+#include <jsapi.h>        // for JS_GetPropertyById, JS_InstanceOf
 #include <jsfriendapi.h>  // for ProtoKeyToClass
 
 #include "gjs/atoms.h"
diff --git a/gjs/module.cpp b/gjs/module.cpp
index c92bd05f..5aa6a981 100644
--- a/gjs/module.cpp
+++ b/gjs/module.cpp
@@ -19,13 +19,17 @@
 #include <js/CompilationAndEvaluation.h>
 #include <js/CompileOptions.h>
 #include <js/Conversions.h>
+#include <js/ErrorReport.h>  // for JS_ReportOutOfMemory
+#include <js/Exception.h>
 #include <js/GCVector.h>  // for RootedVector
 #include <js/Id.h>
 #include <js/Modules.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>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>
diff --git a/gjs/stack.cpp b/gjs/stack.cpp
index a223ad0d..6bbb2469 100644
--- a/gjs/stack.cpp
+++ b/gjs/stack.cpp
@@ -10,7 +10,7 @@
 #include <glib.h>
 
 #include <js/TypeDecls.h>
-#include <jsfriendapi.h>  // for DumpBacktrace
+#include <js/friend/DumpFunctions.h>
 
 #include "gjs/context.h"
 #include "gjs/jsapi-util.h"
diff --git a/gjs/text-encoding.cpp b/gjs/text-encoding.cpp
index 830dda3b..f6b1bbbf 100644
--- a/gjs/text-encoding.cpp
+++ b/gjs/text-encoding.cpp
@@ -23,9 +23,10 @@
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
-#include <js/Utility.h>   // for UniqueChars
+#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 <jsfriendapi.h>  // for ProtoKeyToClass
 #include <mozilla/Unused.h>
 
 #include "gi/boxed.h"
diff --git a/modules/print.cpp b/modules/print.cpp
index 942fd0a1..ad39058b 100644
--- a/modules/print.cpp
+++ b/modules/print.cpp
@@ -12,6 +12,7 @@
 #include <js/CallArgs.h>
 #include <js/CharacterEncoding.h>  // for JS_EncodeStringToUTF8
 #include <js/Conversions.h>
+#include <js/Exception.h>
 #include <js/PropertySpec.h>  // for JS_FN, JSFunctionSpec, JS_FS_END
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
diff --git a/modules/system.cpp b/modules/system.cpp
index 0cd16b6e..b8e8cd1f 100644
--- a/modules/system.cpp
+++ b/modules/system.cpp
@@ -23,8 +23,9 @@
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
 #include <js/Value.h>     // for NullValue
+#include <js/friend/DumpFunctions.h>
 #include <jsapi.h>        // for JS_DefinePropertyById, JS_DefineF...
-#include <jsfriendapi.h>  // for DumpHeap, IgnoreNurseryObjects
+#include <jsfriendapi.h>  // for GetFunctionNativeReserved, NewFunctionByIdW...
 
 #include "gi/object.h"
 #include "gjs/atoms.h"
diff --git a/test/gjs-test-call-args.cpp b/test/gjs-test-call-args.cpp
index d5413600..fccd9c22 100644
--- a/test/gjs-test-call-args.cpp
+++ b/test/gjs-test-call-args.cpp
@@ -14,6 +14,7 @@
 #include <js/PropertySpec.h>
 #include <js/RootingAPI.h>
 #include <js/SourceText.h>
+#include <js/String.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <jsapi.h>       // for JS_DefineFunctions
diff --git a/test/gjs-test-common.cpp b/test/gjs-test-common.cpp
index 323dd2f5..224dcd79 100644
--- a/test/gjs-test-common.cpp
+++ b/test/gjs-test-common.cpp
@@ -8,9 +8,9 @@
 
 #include <js/CharacterEncoding.h>
 #include <js/ErrorReport.h>
+#include <js/Exception.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
-#include <jsapi.h>
 
 #include "test/gjs-test-common.h"
 
diff --git a/test/gjs-test-utils.cpp b/test/gjs-test-utils.cpp
index 9ba459d9..56136fd4 100644
--- a/test/gjs-test-utils.cpp
+++ b/test/gjs-test-utils.cpp
@@ -8,9 +8,9 @@
 #include <glib-object.h>
 #include <glib.h>
 
+#include <js/Realm.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
-#include <jsapi.h>
 
 #include "gjs/context.h"
 #include "gjs/jsapi-util.h"
diff --git a/test/gjs-tests.cpp b/test/gjs-tests.cpp
index cdb24408..13a88c81 100644
--- a/test/gjs-tests.cpp
+++ b/test/gjs-tests.cpp
@@ -20,8 +20,10 @@
 #include <js/Array.h>
 #include <js/BigInt.h>
 #include <js/CharacterEncoding.h>
+#include <js/Exception.h>
 #include <js/Id.h>
 #include <js/RootingAPI.h>
+#include <js/String.h>
 #include <js/TypeDecls.h>
 #include <js/Utility.h>  // for UniqueChars
 #include <js/Value.h>


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