summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dom/asmjscache/AsmJSCache.cpp12
-rw-r--r--dom/asmjscache/test/test_cachingBasic.html2
-rw-r--r--dom/asmjscache/test/test_cachingMulti.html2
-rw-r--r--dom/asmjscache/test/test_workers.html2
-rw-r--r--js/src/jsapi.h1
-rw-r--r--js/src/wasm/AsmJS.cpp3
6 files changed, 4 insertions, 18 deletions
diff --git a/dom/asmjscache/AsmJSCache.cpp b/dom/asmjscache/AsmJSCache.cpp
index 4afcc6d6b..4e1912f23 100644
--- a/dom/asmjscache/AsmJSCache.cpp
+++ b/dom/asmjscache/AsmJSCache.cpp
@@ -71,7 +71,7 @@ namespace {
// Anything smaller should compile fast enough that caching will just add
// overhead.
-// static const size_t sMinCachedModuleLength = 10000;
+static const size_t sMinCachedModuleLength = 10000;
// The number of characters to hash into the Metadata::Entry::mFastHash.
static const unsigned sNumFastHashChars = 4096;
@@ -1520,7 +1520,6 @@ DeallocEntryChild(PAsmJSCacheEntryChild* aActor)
static_cast<ChildRunnable*>(aActor)->Release();
}
-/*
namespace {
JS::AsmJSCacheResult
@@ -1583,7 +1582,6 @@ OpenFile(nsIPrincipal* aPrincipal,
}
} // namespace
-*/
typedef uint32_t AsmJSCookieType;
static const uint32_t sAsmJSCookie = 0x600d600d;
@@ -1596,9 +1594,6 @@ OpenEntryForRead(nsIPrincipal* aPrincipal,
const uint8_t** aMemory,
intptr_t* aHandle)
{
- return false;
-
-/*
if (size_t(aLimit - aBegin) < sMinCachedModuleLength) {
return false;
}
@@ -1638,7 +1633,6 @@ OpenEntryForRead(nsIPrincipal* aPrincipal,
// failure) at which point the file will be closed.
childRunnable.Forget(reinterpret_cast<ChildRunnable**>(aHandle));
return true;
-*/
}
void
@@ -1663,9 +1657,6 @@ OpenEntryForWrite(nsIPrincipal* aPrincipal,
uint8_t** aMemory,
intptr_t* aHandle)
{
- return JS::AsmJSCache_ESR52;
-
-/*
if (size_t(aEnd - aBegin) < sMinCachedModuleLength) {
return JS::AsmJSCache_ModuleTooSmall;
}
@@ -1699,7 +1690,6 @@ OpenEntryForWrite(nsIPrincipal* aPrincipal,
// failure) at which point the file will be closed
childRunnable.Forget(reinterpret_cast<ChildRunnable**>(aHandle));
return JS::AsmJSCache_Success;
-*/
}
void
diff --git a/dom/asmjscache/test/test_cachingBasic.html b/dom/asmjscache/test/test_cachingBasic.html
index e84fdba8b..f491fe9fa 100644
--- a/dom/asmjscache/test/test_cachingBasic.html
+++ b/dom/asmjscache/test/test_cachingBasic.html
@@ -44,7 +44,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=929236
evalAsync(code);
break;
case 1:
- ok(!jsFuns.isAsmJSModuleLoadedFromCache(module), 'module not loaded from cache');
+ ok(jsFuns.isAsmJSModuleLoadedFromCache(module), 'module loaded from cache');
SimpleTest.finish();
break;
default:
diff --git a/dom/asmjscache/test/test_cachingMulti.html b/dom/asmjscache/test/test_cachingMulti.html
index ca092fda0..ceaf75812 100644
--- a/dom/asmjscache/test/test_cachingMulti.html
+++ b/dom/asmjscache/test/test_cachingMulti.html
@@ -36,7 +36,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=944821
code2 += "return g" + i + ";\n";
code2 += "}\n";
code2 += "ok(jsFuns.isAsmJSModule(f), 'f is an asm.js module')\n";
- code2 += "if (assertCacheHit) ok(!jsFuns.isAsmJSModuleLoadedFromCache(f), 'cache disabled');\n";
+ code2 += "if (assertCacheHit) ok(jsFuns.isAsmJSModuleLoadedFromCache(f), 'cache hit');\n";
code2 += "var gX = f();\n";
code2 += "ok(jsFuns.isAsmJSFunction(gX), 'gX is an asm.js function')\n";
code2 += "ok(gX() === " + i + ", 'gX returns the correct result')\n";
diff --git a/dom/asmjscache/test/test_workers.html b/dom/asmjscache/test/test_workers.html
index 992ed785b..6704459f6 100644
--- a/dom/asmjscache/test/test_workers.html
+++ b/dom/asmjscache/test/test_workers.html
@@ -31,7 +31,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=941830
var workerBlob = new Blob([workerCode], {type:"application/javascript"});
var mainCode = asmjsCode;
- mainCode += "ok(!jsFuns.isAsmJSModuleLoadedFromCache(f), 'f is not a cache hit')\n";
+ mainCode += "ok(jsFuns.isAsmJSModuleLoadedFromCache(f), 'f is a cache hit')\n";
mainCode += "var g42 = f();\n";
mainCode += "ok(jsFuns.isAsmJSFunction(g42), 'g42 is an asm.js function');\n";
mainCode += "ok(g42() === 42, 'g42 returns the correct result');\n";
diff --git a/js/src/jsapi.h b/js/src/jsapi.h
index 9ad3e757f..de1425c9b 100644
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -5999,7 +5999,6 @@ enum AsmJSCacheResult
AsmJSCache_Disabled_JitInspector,
AsmJSCache_InternalError,
AsmJSCache_Disabled_PrivateBrowsing,
- AsmJSCache_ESR52,
AsmJSCache_LIMIT
};
diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
index 6964c5d62..34f5a8c0d 100644
--- a/js/src/wasm/AsmJS.cpp
+++ b/js/src/wasm/AsmJS.cpp
@@ -8661,9 +8661,6 @@ BuildConsoleMessage(ExclusiveContext* cx, unsigned time, JS::AsmJSCacheResult ca
case JS::AsmJSCache_Disabled_PrivateBrowsing:
cacheString = "caching disabled by private browsing mode";
break;
- case JS::AsmJSCache_ESR52:
- cacheString = "caching disabled in Firefox ESR52";
- break;
case JS::AsmJSCache_LIMIT:
MOZ_CRASH("bad AsmJSCacheResult");
break;