[gjs/mozjs102: 41/62] boxed: Replace use of JS_AtomizeAndPinJSString()
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mozjs102: 41/62] boxed: Replace use of JS_AtomizeAndPinJSString()
- Date: Sun, 7 Aug 2022 17:52:59 +0000 (UTC)
commit 0ebe34f8a59824aba6ca362a18777a193d766a36
Author: Evan Welsh <contact evanwelsh com>
Date: Thu Jul 21 21:34:45 2022 -0700
boxed: Replace use of JS_AtomizeAndPinJSString()
This is going away in mozjs102, but additionally it wasn't necessary to
use it here. JS_AtomizeAndPinString() already does what we want.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1724234
gi/boxed.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index c2063f84a..3718301cb 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -171,8 +171,7 @@ std::unique_ptr<BoxedPrototype::FieldMap> BoxedPrototype::create_field_map(
// We get the string as a jsid later, which is interned. We intern the
// string here as well, so it will be the same string pointer
- JS::RootedString name(cx, JS_NewStringCopyZ(cx, field_info.name()));
- JSString* atom = JS_AtomizeAndPinJSString(cx, name);
+ JSString* atom = JS_AtomizeAndPinString(cx, field_info.name());
result->putNewInfallible(atom, std::move(field_info));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]