2005-12-29 02:05:31 -05:00
|
|
|
/* "elinks.bookmarks" */
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "elinks.h"
|
|
|
|
|
|
|
|
#include "bookmarks/bookmarks.h"
|
2008-07-16 05:32:24 -04:00
|
|
|
#include "ecmascript/spidermonkey-shared.h"
|
2008-10-19 18:09:45 -04:00
|
|
|
#include "intl/charsets.h"
|
2005-12-29 02:05:31 -05:00
|
|
|
#include "main/event.h"
|
|
|
|
#include "scripting/smjs/core.h"
|
|
|
|
#include "scripting/smjs/elinks_object.h"
|
|
|
|
#include "util/memory.h"
|
|
|
|
|
|
|
|
|
2019-04-21 06:27:40 -04:00
|
|
|
static const JSClass bookmark_class, bookmark_folder_class; /* defined below */
|
2006-11-25 01:54:58 -05:00
|
|
|
|
2019-02-17 14:46:16 -05:00
|
|
|
|
2019-04-21 06:27:40 -04:00
|
|
|
/*** common code ***/
|
2005-12-29 02:05:31 -05:00
|
|
|
|
|
|
|
static JSObject *
|
|
|
|
smjs_get_bookmark_generic_object(struct bookmark *bookmark, JSClass *clasp)
|
|
|
|
{
|
|
|
|
JSObject *jsobj;
|
2006-01-01 18:15:20 -05:00
|
|
|
|
2006-11-25 01:54:58 -05:00
|
|
|
assert(clasp == &bookmark_class || clasp == &bookmark_folder_class);
|
|
|
|
if_assert_failed return NULL;
|
|
|
|
|
2005-12-29 02:05:31 -05:00
|
|
|
jsobj = JS_NewObject(smjs_ctx, clasp, NULL, NULL);
|
|
|
|
if (!jsobj) return NULL;
|
|
|
|
|
|
|
|
if (!bookmark) return jsobj;
|
|
|
|
|
2019-02-10 15:00:37 -05:00
|
|
|
JS_SetPrivate(jsobj, bookmark); /* to @bookmark_class or @bookmark_folder_class */
|
|
|
|
object_lock(bookmark);
|
2005-12-29 02:05:31 -05:00
|
|
|
|
2019-02-10 15:00:37 -05:00
|
|
|
return jsobj;
|
2005-12-29 02:05:31 -05:00
|
|
|
};
|
|
|
|
|
2006-11-23 16:33:43 -05:00
|
|
|
/* @bookmark_class.finalize, @bookmark_folder_class.finalize */
|
2005-12-29 02:05:31 -05:00
|
|
|
static void
|
2019-02-10 15:00:37 -05:00
|
|
|
bookmark_finalize(JSFreeOp *op, JSObject *obj)
|
2005-12-29 02:05:31 -05:00
|
|
|
{
|
2006-11-24 01:50:12 -05:00
|
|
|
struct bookmark *bookmark;
|
2019-02-10 15:00:37 -05:00
|
|
|
#if 0
|
2006-11-25 01:54:58 -05:00
|
|
|
assert(JS_InstanceOf(ctx, obj, (JSClass *) &bookmark_class, NULL)
|
|
|
|
|| JS_InstanceOf(ctx, obj, (JSClass *) &bookmark_folder_class, NULL));
|
|
|
|
if_assert_failed return;
|
2019-02-10 15:00:37 -05:00
|
|
|
#endif
|
2006-11-25 01:54:58 -05:00
|
|
|
|
2019-02-10 15:00:37 -05:00
|
|
|
bookmark = JS_GetPrivate(obj); /* from @bookmark_class or @bookmark_folder_class */
|
2005-12-29 02:05:31 -05:00
|
|
|
|
|
|
|
if (bookmark) object_unlock(bookmark);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*** bookmark object ***/
|
|
|
|
|
2006-12-06 16:09:14 -05:00
|
|
|
/* Tinyids of properties. Use negative values to distinguish these
|
|
|
|
* from array indexes (even though this object has no array elements).
|
|
|
|
* ECMAScript code should not use these directly as in bookmark[-1];
|
|
|
|
* future versions of ELinks may change the numbers. */
|
2005-12-29 02:05:31 -05:00
|
|
|
enum bookmark_prop {
|
2006-12-06 16:09:14 -05:00
|
|
|
BOOKMARK_TITLE = -1,
|
|
|
|
BOOKMARK_URL = -2,
|
|
|
|
BOOKMARK_CHILDREN = -3,
|
2005-12-29 02:05:31 -05:00
|
|
|
};
|
|
|
|
|
2019-02-10 15:00:37 -05:00
|
|
|
static JSBool bookmark_get_property_title(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSMutableHandleValue hvp);
|
|
|
|
static JSBool bookmark_set_property_title(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSBool strict, JSMutableHandleValue hvp);
|
|
|
|
static JSBool bookmark_get_property_url(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSMutableHandleValue hvp);
|
|
|
|
static JSBool bookmark_set_property_url(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSBool strict, JSMutableHandleValue hvp);
|
|
|
|
static JSBool bookmark_get_property_children(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSMutableHandleValue hvp);
|
|
|
|
|
2005-12-29 02:05:31 -05:00
|
|
|
static const JSPropertySpec bookmark_props[] = {
|
2019-02-10 15:00:37 -05:00
|
|
|
{ "title", 0, JSPROP_ENUMERATE, JSOP_WRAPPER(bookmark_get_property_title), JSOP_WRAPPER(bookmark_set_property_title) },
|
|
|
|
{ "url", 0, JSPROP_ENUMERATE, JSOP_WRAPPER(bookmark_get_property_url), JSOP_WRAPPER(bookmark_set_property_url) },
|
|
|
|
{ "children", 0, JSPROP_ENUMERATE | JSPROP_READONLY, JSOP_WRAPPER(bookmark_get_property_children), JSOP_NULLWRAPPER },
|
2005-12-29 02:05:31 -05:00
|
|
|
{ NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static JSObject *smjs_get_bookmark_folder_object(struct bookmark *bookmark);
|
|
|
|
|
2008-10-19 18:09:45 -04:00
|
|
|
/** Convert a string retrieved from struct bookmark to a jsval.
|
|
|
|
*
|
|
|
|
* @return JS_TRUE if successful. On error, report the error and
|
|
|
|
* return JS_FALSE. */
|
|
|
|
static JSBool
|
|
|
|
bookmark_string_to_jsval(JSContext *ctx, const unsigned char *str, jsval *vp)
|
|
|
|
{
|
|
|
|
JSString *jsstr = utf8_to_jsstring(ctx, str, -1);
|
|
|
|
|
|
|
|
if (jsstr == NULL)
|
|
|
|
return JS_FALSE;
|
|
|
|
*vp = STRING_TO_JSVAL(jsstr);
|
|
|
|
return JS_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Convert a jsval to a string and store it in struct bookmark.
|
|
|
|
*
|
|
|
|
* @param ctx
|
|
|
|
* Context for memory allocations and error reports.
|
|
|
|
* @param val
|
|
|
|
* The @c jsval that should be converted.
|
|
|
|
* @param[in,out] result
|
|
|
|
* A string allocated with mem_alloc().
|
|
|
|
* On success, this function frees the original string, if any.
|
|
|
|
*
|
|
|
|
* @return JS_TRUE if successful. On error, report the error to
|
|
|
|
* SpiderMonkey and return JS_FALSE. */
|
|
|
|
static JSBool
|
2012-11-18 15:21:30 -05:00
|
|
|
jsval_to_bookmark_string(JSContext *ctx, jsval val, unsigned char **result)
|
2008-10-19 18:09:45 -04:00
|
|
|
{
|
|
|
|
JSString *jsstr = NULL;
|
|
|
|
unsigned char *str;
|
|
|
|
|
2012-11-25 14:05:52 -05:00
|
|
|
/* JS_ValueToString constructs a new string if val is not
|
|
|
|
* already a string. Protect the new string from the garbage
|
|
|
|
* collector, which jsstring_to_utf8() may trigger.
|
|
|
|
*
|
|
|
|
* Actually, SpiderMonkey 1.8.5 does not require this
|
|
|
|
* JS_AddNamedStringRoot call because it conservatively scans
|
|
|
|
* the C stack for GC roots. Do the call anyway, because:
|
|
|
|
* 1. Omitting the call would require somehow ensuring that the
|
|
|
|
* C compiler won't reuse the stack location too early.
|
|
|
|
* (See template class js::Anchor in <jsapi.h>.)
|
|
|
|
* 2. Later versions of SpiderMonkey are switching back to
|
|
|
|
* precise GC rooting, with a C++-only API.
|
|
|
|
* 3. jsval_to_bookmark_string() does not seem speed-critical. */
|
2011-04-19 16:41:05 -04:00
|
|
|
if (!JS_AddNamedStringRoot(ctx, &jsstr, "jsval_to_bookmark_string"))
|
2008-10-19 18:09:45 -04:00
|
|
|
return JS_FALSE;
|
|
|
|
|
|
|
|
jsstr = JS_ValueToString(ctx, val);
|
|
|
|
if (jsstr == NULL) {
|
2011-04-19 16:41:05 -04:00
|
|
|
JS_RemoveStringRoot(ctx, &jsstr);
|
2008-10-19 18:09:45 -04:00
|
|
|
return JS_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
str = jsstring_to_utf8(ctx, jsstr, NULL);
|
|
|
|
if (str == NULL) {
|
2011-04-19 16:41:05 -04:00
|
|
|
JS_RemoveStringRoot(ctx, &jsstr);
|
2008-10-19 18:09:45 -04:00
|
|
|
return JS_FALSE;
|
|
|
|
}
|
|
|
|
|
2011-04-19 16:41:05 -04:00
|
|
|
JS_RemoveStringRoot(ctx, &jsstr);
|
2008-10-19 18:09:45 -04:00
|
|
|
mem_free_set(result, str);
|
|
|
|
return JS_TRUE;
|
|
|
|
}
|
|
|
|
|
2005-12-29 02:05:31 -05:00
|
|
|
static JSBool
|
2019-02-10 15:00:37 -05:00
|
|
|
bookmark_get_property_title(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSMutableHandleValue hvp)
|
2005-12-29 02:05:31 -05:00
|
|
|
{
|
2019-02-10 15:00:37 -05:00
|
|
|
ELINKS_CAST_PROP_PARAMS
|
|
|
|
|
2006-11-24 01:50:12 -05:00
|
|
|
struct bookmark *bookmark;
|
|
|
|
|
2006-12-03 04:14:22 -05:00
|
|
|
/* This can be called if @obj if not itself an instance of the
|
|
|
|
* appropriate class but has one in its prototype chain. Fail
|
|
|
|
* such calls. */
|
|
|
|
if (!JS_InstanceOf(ctx, obj, (JSClass *) &bookmark_class, NULL))
|
|
|
|
return JS_FALSE;
|
2006-11-25 01:54:58 -05:00
|
|
|
|
2007-05-27 11:32:53 -04:00
|
|
|
bookmark = JS_GetInstancePrivate(ctx, obj,
|
|
|
|
(JSClass *) &bookmark_class, NULL);
|
2005-12-29 02:05:31 -05:00
|
|
|
|
|
|
|
if (!bookmark) return JS_FALSE;
|
|
|
|
|
2019-04-21 06:26:27 -04:00
|
|
|
return bookmark_string_to_jsval(ctx, bookmark->title, vp);
|
2019-02-10 15:00:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
static JSBool
|
|
|
|
bookmark_set_property_title(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSBool strict, JSMutableHandleValue hvp)
|
|
|
|
{
|
|
|
|
ELINKS_CAST_PROP_PARAMS
|
|
|
|
|
|
|
|
struct bookmark *bookmark;
|
|
|
|
unsigned char *title = NULL;
|
|
|
|
unsigned char *url = NULL;
|
|
|
|
int ok;
|
|
|
|
|
|
|
|
/* This can be called if @obj if not itself an instance of the
|
|
|
|
* appropriate class but has one in its prototype chain. Fail
|
|
|
|
* such calls. */
|
|
|
|
if (!JS_InstanceOf(ctx, obj, (JSClass *) &bookmark_class, NULL))
|
|
|
|
return JS_FALSE;
|
|
|
|
|
|
|
|
bookmark = JS_GetInstancePrivate(ctx, obj,
|
|
|
|
(JSClass *) &bookmark_class, NULL);
|
2005-12-29 02:05:31 -05:00
|
|
|
|
2019-02-10 15:00:37 -05:00
|
|
|
if (!bookmark) return JS_FALSE;
|
|
|
|
|
2019-04-21 06:26:27 -04:00
|
|
|
if (!jsval_to_bookmark_string(ctx, *vp, &title))
|
2005-12-29 02:05:31 -05:00
|
|
|
return JS_FALSE;
|
|
|
|
|
2019-02-10 15:00:37 -05:00
|
|
|
ok = update_bookmark(bookmark, get_cp_index("UTF-8"), title, url);
|
|
|
|
mem_free_if(title);
|
|
|
|
mem_free_if(url);
|
|
|
|
return ok ? JS_TRUE : JS_FALSE;
|
2005-12-29 02:05:31 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
static JSBool
|
2019-02-10 15:00:37 -05:00
|
|
|
bookmark_get_property_url(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSMutableHandleValue hvp)
|
2005-12-29 02:05:31 -05:00
|
|
|
{
|
2019-02-10 15:00:37 -05:00
|
|
|
ELINKS_CAST_PROP_PARAMS
|
|
|
|
|
|
|
|
struct bookmark *bookmark;
|
|
|
|
|
|
|
|
/* This can be called if @obj if not itself an instance of the
|
|
|
|
* appropriate class but has one in its prototype chain. Fail
|
|
|
|
* such calls. */
|
|
|
|
if (!JS_InstanceOf(ctx, obj, (JSClass *) &bookmark_class, NULL))
|
|
|
|
return JS_FALSE;
|
|
|
|
|
|
|
|
bookmark = JS_GetInstancePrivate(ctx, obj,
|
|
|
|
(JSClass *) &bookmark_class, NULL);
|
|
|
|
|
|
|
|
if (!bookmark) return JS_FALSE;
|
|
|
|
|
2019-04-21 06:26:27 -04:00
|
|
|
return bookmark_string_to_jsval(ctx, bookmark->url, vp);
|
2019-02-10 15:00:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
static JSBool
|
|
|
|
bookmark_set_property_url(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSBool strict, JSMutableHandleValue hvp)
|
|
|
|
{
|
|
|
|
ELINKS_CAST_PROP_PARAMS
|
|
|
|
|
2006-11-24 01:50:12 -05:00
|
|
|
struct bookmark *bookmark;
|
2008-10-19 18:09:45 -04:00
|
|
|
unsigned char *title = NULL;
|
|
|
|
unsigned char *url = NULL;
|
|
|
|
int ok;
|
2006-11-24 01:50:12 -05:00
|
|
|
|
2006-12-03 04:14:22 -05:00
|
|
|
/* This can be called if @obj if not itself an instance of the
|
|
|
|
* appropriate class but has one in its prototype chain. Fail
|
|
|
|
* such calls. */
|
|
|
|
if (!JS_InstanceOf(ctx, obj, (JSClass *) &bookmark_class, NULL))
|
|
|
|
return JS_FALSE;
|
2006-11-25 01:54:58 -05:00
|
|
|
|
2007-05-27 11:32:53 -04:00
|
|
|
bookmark = JS_GetInstancePrivate(ctx, obj,
|
|
|
|
(JSClass *) &bookmark_class, NULL);
|
2005-12-29 02:05:31 -05:00
|
|
|
|
|
|
|
if (!bookmark) return JS_FALSE;
|
|
|
|
|
2019-04-21 06:26:27 -04:00
|
|
|
if (!jsval_to_bookmark_string(ctx, *vp, &url))
|
2005-12-29 02:05:31 -05:00
|
|
|
return JS_FALSE;
|
|
|
|
|
2008-10-19 18:09:45 -04:00
|
|
|
ok = update_bookmark(bookmark, get_cp_index("UTF-8"), title, url);
|
|
|
|
mem_free_if(title);
|
|
|
|
mem_free_if(url);
|
|
|
|
return ok ? JS_TRUE : JS_FALSE;
|
2005-12-29 02:05:31 -05:00
|
|
|
}
|
|
|
|
|
2019-02-10 15:00:37 -05:00
|
|
|
static JSBool
|
|
|
|
bookmark_get_property_children(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSMutableHandleValue hvp)
|
|
|
|
{
|
|
|
|
ELINKS_CAST_PROP_PARAMS
|
|
|
|
|
|
|
|
struct bookmark *bookmark;
|
|
|
|
|
|
|
|
/* This can be called if @obj if not itself an instance of the
|
|
|
|
* appropriate class but has one in its prototype chain. Fail
|
|
|
|
* such calls. */
|
|
|
|
if (!JS_InstanceOf(ctx, obj, (JSClass *) &bookmark_class, NULL))
|
|
|
|
return JS_FALSE;
|
|
|
|
|
|
|
|
bookmark = JS_GetInstancePrivate(ctx, obj,
|
|
|
|
(JSClass *) &bookmark_class, NULL);
|
|
|
|
|
|
|
|
if (!bookmark) return JS_FALSE;
|
|
|
|
|
2019-04-21 06:26:27 -04:00
|
|
|
*vp = OBJECT_TO_JSVAL(smjs_get_bookmark_folder_object(bookmark));
|
2019-02-10 15:00:37 -05:00
|
|
|
|
|
|
|
return JS_TRUE;
|
|
|
|
}
|
|
|
|
|
2019-04-21 06:27:40 -04:00
|
|
|
static const JSClass bookmark_class = {
|
|
|
|
"bookmark",
|
|
|
|
JSCLASS_HAS_PRIVATE, /* struct bookmark * */
|
|
|
|
JS_PropertyStub, JS_PropertyStub,
|
|
|
|
JS_PropertyStub, JS_StrictPropertyStub,
|
|
|
|
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, bookmark_finalize,
|
|
|
|
};
|
2005-12-29 02:05:31 -05:00
|
|
|
|
|
|
|
static JSObject *
|
|
|
|
smjs_get_bookmark_object(struct bookmark *bookmark)
|
|
|
|
{
|
|
|
|
JSObject *jsobj;
|
|
|
|
|
|
|
|
jsobj = smjs_get_bookmark_generic_object(bookmark,
|
|
|
|
(JSClass *) &bookmark_class);
|
|
|
|
|
|
|
|
if (jsobj
|
|
|
|
&& JS_TRUE == JS_DefineProperties(smjs_ctx, jsobj,
|
|
|
|
(JSPropertySpec *) bookmark_props))
|
|
|
|
return jsobj;
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*** bookmark folder object ***/
|
|
|
|
|
2006-11-23 16:33:43 -05:00
|
|
|
/* @bookmark_folder_class.getProperty */
|
2005-12-29 02:05:31 -05:00
|
|
|
static JSBool
|
2019-02-10 15:00:37 -05:00
|
|
|
bookmark_folder_get_property(JSContext *ctx, JSHandleObject hobj, JSHandleId hid, JSMutableHandleValue hvp)
|
2005-12-29 02:05:31 -05:00
|
|
|
{
|
2019-02-10 15:00:37 -05:00
|
|
|
ELINKS_CAST_PROP_PARAMS
|
2019-04-21 06:27:40 -04:00
|
|
|
jsid id = *(hid._);
|
2019-02-10 15:00:37 -05:00
|
|
|
|
2005-12-29 02:05:31 -05:00
|
|
|
struct bookmark *bookmark;
|
2006-11-24 01:50:12 -05:00
|
|
|
struct bookmark *folder;
|
2012-11-18 15:21:30 -05:00
|
|
|
jsval title_jsval = JSVAL_VOID;
|
2008-10-19 18:09:45 -04:00
|
|
|
unsigned char *title = NULL;
|
2005-12-29 02:05:31 -05:00
|
|
|
|
2006-12-03 04:14:22 -05:00
|
|
|
/* This can be called if @obj if not itself an instance of the
|
|
|
|
* appropriate class but has one in its prototype chain. Fail
|
|
|
|
* such calls. */
|
|
|
|
if (!JS_InstanceOf(ctx, obj, (JSClass *) &bookmark_folder_class, NULL))
|
|
|
|
return JS_FALSE;
|
2006-11-25 01:54:58 -05:00
|
|
|
|
2007-05-27 11:32:53 -04:00
|
|
|
folder = JS_GetInstancePrivate(ctx, obj,
|
|
|
|
(JSClass *) &bookmark_folder_class, NULL);
|
2006-11-24 01:50:12 -05:00
|
|
|
|
2019-04-21 06:26:27 -04:00
|
|
|
*vp = JSVAL_NULL;
|
2005-12-29 02:05:31 -05:00
|
|
|
|
2012-11-18 15:21:30 -05:00
|
|
|
if (!JS_IdToValue(ctx, id, &title_jsval))
|
|
|
|
return JS_FALSE;
|
|
|
|
|
|
|
|
if (!jsval_to_bookmark_string(ctx, title_jsval, &title))
|
2008-10-19 18:09:45 -04:00
|
|
|
return JS_FALSE;
|
2005-12-29 02:05:31 -05:00
|
|
|
|
|
|
|
bookmark = get_bookmark_by_name(folder, title);
|
2006-06-10 20:37:31 -04:00
|
|
|
if (bookmark) {
|
2019-04-21 06:26:27 -04:00
|
|
|
*vp = OBJECT_TO_JSVAL(smjs_get_bookmark_object(bookmark));
|
2006-06-10 20:37:31 -04:00
|
|
|
}
|
2005-12-29 02:05:31 -05:00
|
|
|
|
2008-10-19 18:09:45 -04:00
|
|
|
mem_free(title);
|
2005-12-29 02:05:31 -05:00
|
|
|
return JS_TRUE;
|
|
|
|
}
|
|
|
|
|
2019-04-21 06:27:40 -04:00
|
|
|
static const JSClass bookmark_folder_class = {
|
|
|
|
"bookmark_folder",
|
|
|
|
JSCLASS_HAS_PRIVATE, /* struct bookmark * */
|
|
|
|
JS_PropertyStub, JS_PropertyStub,
|
|
|
|
bookmark_folder_get_property, JS_StrictPropertyStub,
|
|
|
|
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, bookmark_finalize,
|
|
|
|
};
|
2005-12-29 02:05:31 -05:00
|
|
|
|
|
|
|
static JSObject *
|
|
|
|
smjs_get_bookmark_folder_object(struct bookmark *bookmark)
|
|
|
|
{
|
|
|
|
return smjs_get_bookmark_generic_object(bookmark,
|
|
|
|
(JSClass *) &bookmark_folder_class);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
smjs_init_bookmarks_interface(void)
|
|
|
|
{
|
|
|
|
jsval val;
|
|
|
|
struct JSObject *bookmarks_object;
|
|
|
|
|
|
|
|
if (!smjs_ctx || !smjs_elinks_object)
|
|
|
|
return;
|
|
|
|
|
|
|
|
bookmarks_object = smjs_get_bookmark_folder_object(NULL);
|
|
|
|
if (!bookmarks_object) return;
|
|
|
|
|
|
|
|
val = OBJECT_TO_JSVAL(bookmarks_object);
|
|
|
|
|
|
|
|
JS_SetProperty(smjs_ctx, smjs_elinks_object, "bookmarks", &val);
|
|
|
|
}
|