[gjs/mozjs91] engine: Enable private fields and methods
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mozjs91] engine: Enable private fields and methods
- Date: Mon, 11 Oct 2021 22:07:09 +0000 (UTC)
commit c6cbb4ec8661b99f5fb3a89dbf15d535da5b62a0
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 540c8ee6..1da606b8 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]