[gjs/mozjs91: 36/40] engine: Enable private fields and methods
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mozjs91: 36/40] engine: Enable private fields and methods
- Date: Sun, 16 Jan 2022 21:37:04 +0000 (UTC)
commit d9dc68740576ac8f92b6ac5299e78a9b772d49d2
Author: Philip Chimento <philip chimento gmail com>
Date: Mon Oct 11 11:37:23 2021 -0700
engine: Enable private fields and methods
These do not yet work with GObject classes (see GNOME/gjs#331) but it
seems OK to enable them for non-GObject classes in the meantime,
especially since we already have public fields enabled but not yet
working with GObject classes.
gjs/engine.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gjs/engine.cpp b/gjs/engine.cpp
index 540c8ee67..1da606b8d 100644
--- a/gjs/engine.cpp
+++ b/gjs/engine.cpp
@@ -167,7 +167,11 @@ JSContext* gjs_create_js_context(GjsContextPrivate* uninitialized_gjs) {
if (enable_jit) {
gjs_debug(GJS_DEBUG_CONTEXT, "Enabling JIT");
}
- JS::ContextOptionsRef(cx).setAsmJS(enable_jit).setTopLevelAwait(false);
+ JS::ContextOptionsRef(cx)
+ .setAsmJS(enable_jit)
+ .setTopLevelAwait(false)
+ .setPrivateClassFields(true)
+ .setPrivateClassMethods(true);
uint32_t value = enable_jit ? 1 : 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]