[gjs] context: add GJS_DISABLE_EXTRA_WARNING env variable to disable mozjs' extra warnings
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] context: add GJS_DISABLE_EXTRA_WARNING env variable to disable mozjs' extra warnings
- Date: Wed, 13 Aug 2014 07:09:25 +0000 (UTC)
commit 3ecf73c78e886c04a1acc3ded3cdf8407681762a
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Mon Aug 11 19:26:24 2014 +0100
context: add GJS_DISABLE_EXTRA_WARNING env variable to disable mozjs' extra warnings
https://bugzilla.gnome.org/show_bug.cgi?id=734569
gjs/jsapi-util.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 0f62abb..9cb7929 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -101,13 +101,18 @@ gjs_init_context_standard (JSContext *context)
*
* JSOPTION_STRICT: Report warnings to error reporter function.
*/
- options_flags = JSOPTION_DONT_REPORT_UNCAUGHT | JSOPTION_EXTRA_WARNINGS;
+ options_flags = JSOPTION_DONT_REPORT_UNCAUGHT;
if (!g_getenv("GJS_DISABLE_JIT")) {
gjs_debug(GJS_DEBUG_CONTEXT, "Enabling JIT");
options_flags |= JSOPTION_TYPE_INFERENCE | JSOPTION_ION | JSOPTION_BASELINE | JSOPTION_ASMJS;
}
+ if (!g_getenv("GJS_DISABLE_EXTRA_WARNINGS")) {
+ gjs_debug(GJS_DEBUG_CONTEXT, "Enabling extra warnings");
+ options_flags |= JSOPTION_EXTRA_WARNINGS;
+ }
+
JS_SetOptions(context, JS_GetOptions(context) | options_flags);
JS_SetErrorReporter(context, gjs_error_reporter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]