[gjs] build: Remove usage of jsfriendapi.h
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] build: Remove usage of jsfriendapi.h
- Date: Mon, 7 Nov 2016 21:15:45 +0000 (UTC)
commit 030dcf69db129904bf17db8509a0fdb211029051
Author: Philip Chimento <philip endlessm com>
Date: Mon Nov 7 11:42:38 2016 -0800
build: Remove usage of jsfriendapi.h
The "friend API" is more unstable in between SpiderMonkey releases than
the normal API, so we should avoid using it if possible. Since we only
need it for this one numerical constant, we just stick the number in, as
we were already doing lower down in the file.
https://bugzilla.gnome.org/show_bug.cgi?id=742249
gjs/jsapi-private.cpp | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/gjs/jsapi-private.cpp b/gjs/jsapi-private.cpp
index e032e4d..9e1f329 100644
--- a/gjs/jsapi-private.cpp
+++ b/gjs/jsapi-private.cpp
@@ -31,14 +31,6 @@
#include "jsapi-private.h"
#include "jsapi-wrapper.h"
-#include <string.h>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wstrict-prototypes"
-#pragma GCC diagnostic ignored "-Winvalid-offsetof"
-#pragma GCC diagnostic ignored "-Wredundant-decls"
-#include <jsfriendapi.h>
-#pragma GCC diagnostic pop
-
void
gjs_error_reporter(JSContext *context,
const char *message,
@@ -49,7 +41,8 @@ gjs_error_reporter(JSContext *context,
if (gjs_environment_variable_is_set("GJS_ABORT_ON_OOM") &&
report->flags == JSREPORT_ERROR &&
- report->errorNumber == JSMSG_OUT_OF_MEMORY) {
+ report->errorNumber == 137) {
+ /* 137, JSMSG_OUT_OF_MEMORY */
g_error("GJS ran out of memory at %s: %i.",
report->filename,
report->lineno);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]