[gjs: 6/8] jsapi-util-string: Avoid unnecessary root
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 6/8] jsapi-util-string: Avoid unnecessary root
- Date: Thu, 31 May 2018 23:54:37 +0000 (UTC)
commit d5fe6ab42d3e5d1d68c282722547cae30e2bf119
Author: Philip Chimento <philip chimento gmail com>
Date: Tue May 15 22:19:26 2018 -0400
jsapi-util-string: Avoid unnecessary root
gjs/jsapi-util-string.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index 2add8902..03e8c4fd 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -365,8 +365,7 @@ gjs_intern_string_to_id(JSContext *cx,
{
JSAutoRequest ar(cx);
JS::RootedString str(cx, JS_AtomizeAndPinString(cx, string));
- JS::RootedId id(cx, INTERNED_STRING_TO_JSID(cx, str));
- return id;
+ return INTERNED_STRING_TO_JSID(cx, str);
}
static std::string
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]