зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1417844 part 3 - Remove JSVersion from subscript cache path. r=kmag
This commit is contained in:
Родитель
7f30bf48a7
Коммит
2e7986aee1
|
@ -94,13 +94,11 @@ NS_IMPL_ISUPPORTS(mozJSSubScriptLoader, mozIJSSubScriptLoader)
|
|||
static void
|
||||
SubscriptCachePath(JSContext* cx, nsIURI* uri, JS::HandleObject targetObj, nsACString& cachePath)
|
||||
{
|
||||
// StartupCache must distinguish between non-syntactic vs global, as well as
|
||||
// javascript version when computing the cache key.
|
||||
// StartupCache must distinguish between non-syntactic vs global when
|
||||
// computing the cache key.
|
||||
bool hasNonSyntacticScope = !JS_IsGlobalObject(targetObj);
|
||||
JSVersion version = JS_GetVersion(cx);
|
||||
cachePath.Assign(hasNonSyntacticScope ? JSSUB_CACHE_PREFIX("non-syntactic")
|
||||
: JSSUB_CACHE_PREFIX("global"));
|
||||
cachePath.AppendPrintf("/%d", version);
|
||||
PathifyURI(uri, cachePath);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче