[gjs/wip/ptomato/mozjs45prep: 11/18] js: JS_InternString -> JS_AtomizeAndPinString



commit 34778f235d54002c566c089b5d83f8071c1ed98f
Author: Philip Chimento <philip endlessm com>
Date:   Sun Mar 19 05:15:48 2017 +0000

    js: JS_InternString -> JS_AtomizeAndPinString

 gi/repo.cpp               |    2 +-
 gjs/jsapi-util-string.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/repo.cpp b/gi/repo.cpp
index a641aaa..0a46a73 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -616,7 +616,7 @@ lookup_override_function(JSContext             *cx,
 
         /* If the exception was an ImportError (i.e., module not found) then
          * we simply didn't have an override, don't throw an exception */
-        if (error_has_name(cx, exc, JS_InternString(cx, "ImportError"))) {
+        if (error_has_name(cx, exc, JS_AtomizeAndPinString(cx, "ImportError"))) {
             saved_exc.restore();
             return true;
         }
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index c9776e5..e12f0de 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -398,7 +398,7 @@ gjs_intern_string_to_id(JSContext  *cx,
                         const char *string)
 {
     JSAutoRequest ar(cx);
-    JS::RootedString str(cx, JS_InternString(cx, string));
+    JS::RootedString str(cx, JS_AtomizeAndPinString(cx, string));
     JS::RootedId id(cx, INTERNED_STRING_TO_JSID(cx, str));
     return id;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]