[gjs: 6/8] jsapi-util-string: Avoid unnecessary root



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]