summaryrefslogtreecommitdiffstats
path: root/js/src/vm/Caches.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/vm/Caches.h')
-rw-r--r--js/src/vm/Caches.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/js/src/vm/Caches.h b/js/src/vm/Caches.h
index dcd0c78822..82979c1283 100644
--- a/js/src/vm/Caches.h
+++ b/js/src/vm/Caches.h
@@ -43,10 +43,15 @@ struct EvalCacheEntry {
};
struct EvalCacheLookup {
- explicit EvalCacheLookup(JSContext* cx) : str(cx), callerScript(cx) {}
- Rooted<JSLinearString*> str;
- RootedScript callerScript;
- MOZ_INIT_OUTSIDE_CTOR jsbytecode* pc;
+ JSLinearString* str = nullptr;
+ JSScript* callerScript = nullptr;
+ MOZ_INIT_OUTSIDE_CTOR jsbytecode* pc = nullptr;
+
+ EvalCacheLookup() = default;
+ EvalCacheLookup(JSLinearString* str, JSScript* callerScript, jsbytecode* pc)
+ : str(str), callerScript(callerScript), pc(pc) {}
+
+ void trace(JSTracer* trc);
};
struct EvalCacheHashPolicy {