summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gjs/coverage.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index 2355b083..7db96d99 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1704,20 +1704,18 @@ gjs_coverage_constructed(GObject *object)
GjsCoverage *coverage = GJS_COVERAGE(object);
GjsCoveragePrivate *priv = (GjsCoveragePrivate *) gjs_coverage_get_instance_private(coverage);
- JSContext *context = (JSContext *) gjs_context_get_native_context(priv->context);
-
if (!priv->cache_specified) {
g_message("Cache path was not given, picking default one");
priv->cache = g_file_new_for_path(".internal-gjs-coverage-cache");
}
- /* Before bootstrapping, turn off the JIT on the context */
- JS::RuntimeOptionsRef(context)
- .setIon(false)
- .setBaseline(false)
- .setAsmJS(false);
+ /* We now enable Ion and BaselineJIT in coverage mode. See the comment
+ * in gjs/runtime.cpp:gjs_clear_thread_runtime for some important
+ * information regarding runtime lifecycle management and garbage collection
+ * bugs in js24 */
if (!bootstrap_coverage(coverage)) {
+ JSContext *context = static_cast<JSContext *>(gjs_context_get_native_context(priv->context));
JSAutoCompartment compartment(context, gjs_get_import_global(context));
gjs_log_exception(context);
}