[gjs/mozjs102: 5/11] js: Adapt to new JS::SafelyInitialized API
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mozjs102: 5/11] js: Adapt to new JS::SafelyInitialized API
- Date: Sun, 7 Aug 2022 23:38:31 +0000 (UTC)
commit 0aa435fc169b3ee36e3afdc2c8b6d5043a0a89d7
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]