summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Welsh <contact@evanwelsh.com>2022-07-22 12:39:21 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2022-08-07 16:42:03 -0700
commit25ddb334dc3a101ea768df516b85c95cc93d560f (patch)
tree5e91d15600cbf1f947fd3a79e77f45e7ad7e7bf8
parenta0ed043a9f2e75af44d9ccb7db2117cbdf0b828d (diff)
downloadgjs-25ddb334dc3a101ea768df516b85c95cc93d560f.tar.gz
js: Adapt to new JS::SafelyInitialized API
See: https://hg.mozilla.org/mozilla-central/rev/551bd2292b5c9722f77f4501191a32a605a9f89b
-rw-r--r--gjs/jsapi-util-root.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gjs/jsapi-util-root.h b/gjs/jsapi-util-root.h
index 7f4e2749..6060e3eb 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;
}