Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224
This commit is contained in:
@@ -100,9 +100,11 @@ SubscriptCachePath(JSContext* cx, nsIURI* uri, JS::HandleObject targetObj, nsACS
|
||||
{
|
||||
// StartupCache must distinguish between non-syntactic vs global when
|
||||
// computing the cache key.
|
||||
bool hasNonSyntacticScope = !JS_IsGlobalObject(targetObj);
|
||||
cachePath.Assign(hasNonSyntacticScope ? JSSUB_CACHE_PREFIX("non-syntactic")
|
||||
: JSSUB_CACHE_PREFIX("global"));
|
||||
if (!JS_IsGlobalObject(targetObj)) {
|
||||
cachePath.AssignLiteral(JSSUB_CACHE_PREFIX("non-syntactic"));
|
||||
} else {
|
||||
cachePath.AssignLiteral(JSSUB_CACHE_PREFIX("global"));
|
||||
}
|
||||
PathifyURI(uri, cachePath);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user