[gjs/mozjs78: 11/21] Remove GJS_DISABLE_EXTRA_WARNINGS. - Upstream has removed this feature and recommends using linters.
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mozjs78: 11/21] Remove GJS_DISABLE_EXTRA_WARNINGS. - Upstream has removed this feature and recommends using linters.
- Date: Sun, 5 Jul 2020 03:36:05 +0000 (UTC)
commit 3dfed43b76a59780f7029f3264724df88085c315
Author: Evan Welsh <noreply evanwelsh com>
Date: Sat Jul 4 22:19:05 2020 -0500
Remove GJS_DISABLE_EXTRA_WARNINGS.
- Upstream has removed this feature and recommends using linters.
gjs/engine.cpp | 8 ++++----
installed-tests/minijasmine.cpp | 2 --
2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gjs/engine.cpp b/gjs/engine.cpp
index e3bd937a..6182bc02 100644
--- a/gjs/engine.cpp
+++ b/gjs/engine.cpp
@@ -245,10 +245,10 @@ JSContext* gjs_create_js_context(GjsContextPrivate* uninitialized_gjs) {
auto hook = mozilla::MakeUnique<GjsSourceHook>();
js::SetSourceHook(cx, std::move(hook));
- /* setExtraWarnings: Be extra strict about code that might hide a bug */
- if (!g_getenv("GJS_DISABLE_EXTRA_WARNINGS")) {
- gjs_debug(GJS_DEBUG_CONTEXT, "Enabling extra warnings");
- JS::ContextOptionsRef(cx).setExtraWarnings(true);
+ if (g_getenv("GJS_DISABLE_EXTRA_WARNINGS")) {
+ g_warning(
+ "GJS_DISABLE_EXTRA_WARNINGS has been removed, GJS no longer logs "
+ "extra warnings.");
}
bool enable_jit = !(g_getenv("GJS_DISABLE_JIT"));
diff --git a/installed-tests/minijasmine.cpp b/installed-tests/minijasmine.cpp
index f8ca8490..3c73a226 100644
--- a/installed-tests/minijasmine.cpp
+++ b/installed-tests/minijasmine.cpp
@@ -45,8 +45,6 @@ main(int argc, char **argv)
/* The fact that this isn't the default is kind of lame... */
g_setenv("GJS_DEBUG_OUTPUT", "stderr", false);
- /* Jasmine library has some code style nits that trip this */
- g_setenv("GJS_DISABLE_EXTRA_WARNINGS", "1", false);
setlocale(LC_ALL, "");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]