[gjs/mozjs78: 9/21] Use JS::PropertyKey instead of removed macro. - 'INTERNED_STRING_TO_JSID' is now 'JS::PropertyKey::f
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mozjs78: 9/21] Use JS::PropertyKey instead of removed macro. - 'INTERNED_STRING_TO_JSID' is now 'JS::PropertyKey::f
- Date: Sun, 5 Jul 2020 03:35:55 +0000 (UTC)
commit 6e03b1f4830d442605e747f08932fd69318951ba
Author: Evan Welsh <noreply evanwelsh com>
Date: Sat Jul 4 22:14:39 2020 -0500
Use JS::PropertyKey instead of removed macro.
- 'INTERNED_STRING_TO_JSID' is now 'JS::PropertyKey::fromPinnedString'
gjs/atoms.cpp | 3 ++-
gjs/jsapi-util-string.cpp | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gjs/atoms.cpp b/gjs/atoms.cpp
index 5329ddc2..a349d0e7 100644
--- a/gjs/atoms.cpp
+++ b/gjs/atoms.cpp
@@ -39,7 +39,8 @@ bool GjsAtom::init(JSContext* cx, const char* str) {
JSString* s = JS_AtomizeAndPinString(cx, str);
if (!s)
return false;
- m_jsid = JS::Heap<jsid>{INTERNED_STRING_TO_JSID(cx, s)};
+
+ m_jsid = JS::Heap<jsid>{JS::PropertyKey::fromPinnedString(s)};
return true;
}
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index 5c6d9e56..43a71284 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -37,7 +37,7 @@
#include <js/CharacterEncoding.h>
#include <js/Class.h>
#include <js/GCAPI.h> // for AutoCheckCannotGC
-#include <js/Id.h> // for JSID_IS_STRING, INTERNED_STRING_TO...
+#include <js/Id.h> // for JSID_IS_STRING...
#include <js/RootingAPI.h>
#include <js/Symbol.h>
#include <js/TypeDecls.h>
@@ -377,7 +377,7 @@ gjs_intern_string_to_id(JSContext *cx,
JS::RootedString str(cx, JS_AtomizeAndPinString(cx, string));
if (!str)
return JSID_VOID;
- return INTERNED_STRING_TO_JSID(cx, str);
+ return JS::PropertyKey::fromPinnedString(str);
}
GJS_USE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]