[gjs/mozjs102: 47/59] boxed: Replace use of JS_AtomizeAndPinJSString()




commit d343f5536bdcbe692a6e886b1d824dbd45a87019
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.

 gi/boxed.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 1bd2bb60b..0ab097b0a 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -170,8 +170,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]