[gjs/mozjs102: 54/59] js: Adapt to new JS::SafelyInitialized API




commit bd2944e84097c3459a49d3c89dbb2acdfac67c86
Author: Evan Welsh <contact evanwelsh com>
Date:   Fri Jul 22 12:39:21 2022 -0700

    js: Adapt to new JS::SafelyInitialized API

 gjs/jsapi-util-root.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gjs/jsapi-util-root.h b/gjs/jsapi-util-root.h
index 7f4e27495..6060e3eba 100644
--- a/gjs/jsapi-util-root.h
+++ b/gjs/jsapi-util-root.h
@@ -178,7 +178,7 @@ class GjsMaybeOwned {
     void root(JSContext* cx, const T& thing) {
         debug("root()");
         g_assert(!m_root);
-        g_assert(m_heap.get() == JS::SafelyInitialized<T>());
+        g_assert(m_heap.get() == JS::SafelyInitialized<T>::create());
         m_heap.~Heap();
         m_root = std::make_unique<JS::PersistentRooted<T>>(cx, thing);
     }
@@ -204,7 +204,7 @@ class GjsMaybeOwned {
     void reset() {
         debug("reset()");
         if (!m_root) {
-            m_heap = JS::SafelyInitialized<T>();
+            m_heap = JS::SafelyInitialized<T>::create();
             return;
         }
 


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