[gjs/wip/ptomato/mozjs31: 2/5] compat: Remove deprecated libgjs public API
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs31: 2/5] compat: Remove deprecated libgjs public API
- Date: Tue, 4 Oct 2016 23:40:12 +0000 (UTC)
commit e3eda0bb2c5e6507b9d3ca0cf86e6b0b02e62881
Author: Philip Chimento <philip chimento gmail com>
Date: Mon Sep 19 21:22:48 2016 -0700
compat: Remove deprecated libgjs public API
Since we require an API break for mozjs31 anyway, these can now be
removed.
gjs/compat.h | 23 -----------------------
gjs/jsapi-dynamic-class.cpp | 14 --------------
gjs/jsapi-util.h | 5 -----
3 files changed, 0 insertions(+), 42 deletions(-)
---
diff --git a/gjs/compat.h b/gjs/compat.h
index bb6db79..c645c9a 100644
--- a/gjs/compat.h
+++ b/gjs/compat.h
@@ -45,30 +45,7 @@ _Pragma("clang diagnostic pop")
#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
_Pragma("GCC diagnostic pop")
#endif
-#include <stdbool.h>
-#include <glib.h>
#include <gjs/jsapi-util.h>
-G_BEGIN_DECLS
-
-#define JSVAL_IS_OBJECT(obj) \
- _Pragma("GCC warning \"JSVAL_IS_OBJECT is deprecated. Use JS::Value::isObjectOrNull() instead.\"") \
- ((obj).isObjectOrNull())
-
-#define JS_GetGlobalObject(cx) \
- _Pragma("GCC warning \"JS_GetGlobalObject is deprecated. Use JS_GetGlobalForObject() or
JS_GetGlobalForScopeChain() instead.\"") \
- gjs_get_global_object(cx)
-
-static bool G_GNUC_UNUSED G_GNUC_DEPRECATED_FOR(JS::NumberValue)
-JS_NewNumberValue(JSContext *cx,
- double d,
- JS::Value *rval)
- {
- *rval = JS_NumberValue(d);
- return rval->isNumber();
- }
-
-G_END_DECLS
-
#endif /* __GJS_COMPAT_H__ */
diff --git a/gjs/jsapi-dynamic-class.cpp b/gjs/jsapi-dynamic-class.cpp
index c87fc9b..2581b2a 100644
--- a/gjs/jsapi-dynamic-class.cpp
+++ b/gjs/jsapi-dynamic-class.cpp
@@ -35,20 +35,6 @@
#include <string.h>
#include <math.h>
-/*
- * This shim was because of a bug in JS_NewObjectForConstructor in JS 1.8.5. It
- * attempted to retrieve the JSClass from private fields in the constructor
- * function, which failed for our "dynamic classes".
- * This function is deprecated.
- */
-JSObject *
-gjs_new_object_for_constructor(JSContext *context,
- JSClass *clasp,
- JS::Value *vp)
-{
- return JS_NewObjectForConstructor(context, clasp, vp);
-}
-
bool
gjs_init_class_dynamic(JSContext *context,
JSObject *in_object,
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 811074f..3444186 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -276,11 +276,6 @@ bool gjs_object_require_property (JSContext *context,
jsid property_name,
JS::Value *value_p);
-JSObject *gjs_new_object_for_constructor (JSContext *context,
- JSClass *clasp,
- JS::Value *vp)
-G_GNUC_DEPRECATED_FOR(JS_NewObjectForConstructor);
-
bool gjs_init_class_dynamic (JSContext *context,
JSObject *in_object,
JSObject *parent_proto,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]