diff options
author | Evan Welsh <contact@evanwelsh.com> | 2021-07-10 20:14:56 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2022-01-16 13:29:11 -0800 |
commit | 83e4c835cee6f8187cefd52b6a5fefca792ec6b5 (patch) | |
tree | d8e74874b98b281640a39445a74b2e2f3494da17 /gjs/module.cpp | |
parent | 3cab147af05d0ac243fecdba28c88d7cc785b24c (diff) | |
download | gjs-83e4c835cee6f8187cefd52b6a5fefca792ec6b5.tar.gz |
Some Object-related functions have moved to js/Object.h
- JS_[Get,Set]Private is now JS::[Get,Set]Private
- JS_GetReservedSlot is now JS::GetReservedSlot
- JS_SetReservedSlot still exists, but we'll update it now
See https://bugzilla.mozilla.org/show_bug.cgi?id=1663365
Diffstat (limited to 'gjs/module.cpp')
-rw-r--r-- | gjs/module.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gjs/module.cpp b/gjs/module.cpp index ebd569b8..60a6b18d 100644 --- a/gjs/module.cpp +++ b/gjs/module.cpp @@ -24,6 +24,7 @@ #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> @@ -67,13 +68,13 @@ class GjsScriptModule { /* Private data accessors */ [[nodiscard]] static inline GjsScriptModule* priv(JSObject* module) { - return static_cast<GjsScriptModule*>(JS_GetPrivate(module)); + return static_cast<GjsScriptModule*>(JS::GetPrivate(module)); } /* Creates a JS module object. Use instead of the class's constructor */ [[nodiscard]] static JSObject* create(JSContext* cx, const char* name) { JSObject* module = JS_NewObject(cx, &GjsScriptModule::klass); - JS_SetPrivate(module, new GjsScriptModule(name)); + JS::SetPrivate(module, new GjsScriptModule(name)); return module; } |