Skip to content

Commit

Permalink
jsapi-util-string: Avoid unnecessary root
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomato authored and jaszhix committed Aug 1, 2018
1 parent 8ab2aa9 commit a8b578d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cjs/jsapi-util-string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8b578d

Please sign in to comment.