[gjs/mozjs102: 45/62] boxed: Adapt to namespaced SetReservedSlot API
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mozjs102: 45/62] boxed: Adapt to namespaced SetReservedSlot API
- Date: Sun, 7 Aug 2022 17:53:00 +0000 (UTC)
commit 9786798937e7e5f9e7bdeec3d42097651dde2a64
Author: Evan Welsh <contact evanwelsh com>
Date: Sat Aug 6 14:32:08 2022 -0700
boxed: Adapt to namespaced SetReservedSlot API
SpiderMonkey 91 has both JS_SetReservedSlot() and JS::SetReservedSlot(),
for some reason. The former is going away in SpiderMonkey 102.
gi/boxed.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 3718301cb..89d97e3a5 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -19,6 +19,7 @@
#include <js/Exception.h>
#include <js/GCHashTable.h> // for GCHashMap
#include <js/GCVector.h> // for MutableWrappedPtrOperations
+#include <js/Object.h> // for SetReservedSlot
#include <js/String.h>
#include <js/TracingAPI.h>
#include <js/TypeDecls.h>
@@ -506,7 +507,7 @@ bool BoxedInstance::get_nested_interface_object(
/* We never actually read the reserved slot, but we put the parent object
* into it to hold onto the parent object.
*/
- JS_SetReservedSlot(obj, 0, JS::ObjectValue(*parent_obj));
+ JS::SetReservedSlot(obj, 0, JS::ObjectValue(*parent_obj));
value.setObject(*obj);
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]