1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[spidermonkey] More finalizers

This commit is contained in:
Witold Filipczyk 2021-10-13 18:30:24 +02:00
parent a456f3824d
commit 85aeb67af0
5 changed files with 41 additions and 6 deletions

View File

@ -199,7 +199,8 @@ static bool location_set_property_protocol(JSContext *ctx, unsigned int argc, JS
static bool location_get_property_search(JSContext *ctx, unsigned int argc, JS::Value *vp);
static bool location_set_property_search(JSContext *ctx, unsigned int argc, JS::Value *vp);
static void location_finalize(JSFreeOp *op, JSObject *obj)
static void
location_finalize(JSFreeOp *op, JSObject *obj)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);

View File

@ -51,6 +51,14 @@ static bool navigator_get_property_language(JSContext *ctx, unsigned int argc, J
static bool navigator_get_property_platform(JSContext *ctx, unsigned int argc, JS::Value *vp);
static bool navigator_get_property_userAgent(JSContext *ctx, unsigned int argc, JS::Value *vp);
static void
navigator_finalize(JSFreeOp *op, JSObject *obj)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
}
JSClassOps navigator_ops = {
nullptr, // addProperty
nullptr, // deleteProperty
@ -58,7 +66,7 @@ JSClassOps navigator_ops = {
nullptr, // newEnumerate
nullptr, // resolve
nullptr, // mayResolve
nullptr, // finalize
navigator_finalize, // finalize
nullptr, // call
nullptr, // hasInstance
nullptr, // construct

View File

@ -45,6 +45,15 @@
#include "viewer/text/link.h"
#include "viewer/text/vs.h"
static void
screen_finalize(JSFreeOp *op, JSObject *obj)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
}
JSClassOps screen_ops = {
nullptr, // addProperty
nullptr, // deleteProperty
@ -52,7 +61,7 @@ JSClassOps screen_ops = {
nullptr, // newEnumerate
nullptr, // resolve
nullptr, // mayResolve
nullptr, // finalize
screen_finalize, // finalize
nullptr, // call
nullptr, // hasInstance
nullptr, // construct

View File

@ -48,6 +48,14 @@
static bool unibar_get_property_visible(JSContext *ctx, unsigned int argc, JS::Value *vp);
static bool unibar_set_property_visible(JSContext *ctx, unsigned int argc, JS::Value *vp);
static void
menubar_finalize(JSFreeOp *op, JSObject *obj)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
}
JSClassOps menubar_ops = {
nullptr, // addProperty
nullptr, // deleteProperty
@ -55,7 +63,7 @@ JSClassOps menubar_ops = {
nullptr, // newEnumerate
nullptr, // resolve
nullptr, // mayResolve
nullptr, // finalize
menubar_finalize, // finalize
nullptr, // call
nullptr, // hasInstance
nullptr, // construct
@ -69,6 +77,14 @@ JSClass menubar_class = {
&menubar_ops
};
static void
statusbar_finalize(JSFreeOp *op, JSObject *obj)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
}
JSClassOps statusbar_ops = {
nullptr, // addProperty
nullptr, // deleteProperty
@ -76,7 +92,7 @@ JSClassOps statusbar_ops = {
nullptr, // newEnumerate
nullptr, // resolve
nullptr, // mayResolve
nullptr, // finalize
statusbar_finalize, // finalize
nullptr, // call
nullptr, // hasInstance
nullptr, // construct

View File

@ -53,7 +53,8 @@ static bool window_get_property_status(JSContext *ctx, unsigned int argc, JS::Va
static bool window_set_property_status(JSContext *ctx, unsigned int argc, JS::Value *vp);
static bool window_get_property_top(JSContext *ctx, unsigned int argc, JS::Value *vp);
static void window_finalize(JSFreeOp *op, JSObject *obj)
static void
window_finalize(JSFreeOp *op, JSObject *obj)
{
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);