From a8b578d64edbc22c706abf83367194720c70af84 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Tue, 15 May 2018 22:19:26 -0400 Subject: [PATCH] jsapi-util-string: Avoid unnecessary root --- cjs/jsapi-util-string.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cjs/jsapi-util-string.cpp b/cjs/jsapi-util-string.cpp index 2add8902..03e8c4fd 100644 --- a/cjs/jsapi-util-string.cpp +++ b/cjs/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