[gjs/wip/ptomato/mozjs52: 18/42] js: Rename JS_InternString to JS_AtomizeAndPinString



commit a8468cb9db9ece1065e1d802617e1c91d3bd5423
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Mar 19 05:15:48 2017 +0000

    js: Rename JS_InternString to JS_AtomizeAndPinString
    
    This was simply renamed in SpiderMonkey 45.

 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 52d03d2..3a5ab28 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -597,7 +597,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 e01d595..45773ad 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -391,7 +391,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]