[gjs/wip/ptomato/mozjs52: 11/36] js: Rename JS_InternString to JS_AtomizeAndPinString



commit 160872d30953f836fc4a4098567ea039b9932873
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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=784196

 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 ff5621e..aea66b2 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -592,7 +592,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 1608527..bc8cb74 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -382,7 +382,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]