diff --git a/caps/src/nsScriptSecurityManager.cpp b/caps/src/nsScriptSecurityManager.cpp index 189155bbc50..158ff786535 100644 --- a/caps/src/nsScriptSecurityManager.cpp +++ b/caps/src/nsScriptSecurityManager.cpp @@ -81,22 +81,6 @@ bool nsScriptSecurityManager::sStrictFileOriginPolicy = true; /////////////////////////// // Convenience Functions // /////////////////////////// -// Result of this function should not be freed. -static inline const char16_t * -IDToString(JSContext *cx, jsid id_) -{ - JS::RootedId id(cx, id_); - if (JSID_IS_STRING(id)) - return JS_GetInternedStringChars(JSID_TO_STRING(id)); - - JS::Rooted idval(cx); - if (!JS_IdToValue(cx, id, &idval)) - return nullptr; - JSString *str = JS::ToString(cx, idval); - if(!str) - return nullptr; - return JS_GetStringCharsZ(cx, str); -} class nsAutoInPrincipalDomainOriginSetter { public: