[gjs/mozjs102: 8/14] js: Adapt to new JS::SafelyInitialized API




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

    js: Adapt to new JS::SafelyInitialized API
    
    See: https://hg.mozilla.org/mozilla-central/rev/551bd2292b5c9722f77f4501191a32a605a9f89b

 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]