[gjs/wip/ptomato/mozjs45prep: 11/16] js: JS_InternString -> JS_AtomizeAndPinString
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs45prep: 11/16] js: JS_InternString -> JS_AtomizeAndPinString
- Date: Sun, 19 Mar 2017 05:21:46 +0000 (UTC)
commit 2d3a227e3fca09154bb4582139fa4b9e6cc68b8f
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]