1 --- a/src/scripting/smjs/action_object.c 2012-06-28 11:46:58.000000000 -0400
2 +++ b/src/scripting/smjs/action_object.c 2012-06-28 11:52:42.000000000 -0400
5 if_assert_failed return JS_FALSE;
10 if (JS_TRUE != JS_ValueToObject(ctx, argv[-2], &fn_obj)) {
11 JS_SET_RVAL(ctx, rval, value);
14 do_action(hop->ses, hop->action_id, 1);
18 JS_SET_RVAL(ctx, rval, value);
21 --- a/src/scripting/smjs/bookmarks.c 2012-06-28 11:57:40.000000000 -0400
22 +++ b/src/scripting/smjs/bookmarks.c 2012-06-28 12:08:20.000000000 -0400
25 /* @bookmark_folder_class.getProperty */
27 +#if JS_VERSION >= 185
28 +bookmark_folder_get_property(JSContext *ctx, JSObject *obj, jsid iid, jsval *vp)
30 bookmark_folder_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
33 struct bookmark *bookmark;
34 struct bookmark *folder;
35 unsigned char *title = NULL;
36 +#if JS_VERSION >= 185
38 + if (!JS_IdToValue(ctx,iid,&id))
42 /* This can be called if @obj if not itself an instance of the
43 * appropriate class but has one in its prototype chain. Fail
44 --- a/src/scripting/smjs/elinks_object.c 2012-06-28 12:11:15.000000000 -0400
45 +++ b/src/scripting/smjs/elinks_object.c 2012-06-28 12:14:50.000000000 -0400
50 - if (JSVAL_VOID == *rval)
51 + if (JSVAL_IS_VOID(*rval))
54 return JS_CallFunctionValue(smjs_ctx, smjs_elinks_object,
55 --- a/src/scripting/smjs/globhist.c 2012-06-28 12:20:25.000000000 -0400
56 +++ b/src/scripting/smjs/globhist.c 2012-06-28 12:20:15.000000000 -0400
59 /* @smjs_globhist_class.getProperty */
61 -smjs_globhist_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
62 +#if JS_VERSION >= 185
63 +smjs_globhist_get_property(JSContext *ctx, JSObject *obj, jsid iid, jsval *vp)
65 +smjs_globhist_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
69 unsigned char *uri_string;
70 struct global_history_item *history_item;
71 +#if JS_VERSION >= 185
73 + if (!JS_IdToValue(ctx,iid,&id))
77 uri_string = JS_EncodeString(ctx, JS_ValueToString(ctx, id));
78 if (!uri_string) goto ret_null;
79 --- a/src/scripting/smjs/keybinding.c 2012-06-28 12:21:39.000000000 -0400
80 +++ b/src/scripting/smjs/keybinding.c.new 2012-06-28 12:48:00.000000000 -0400
83 /* @keymap_class.getProperty */
85 -keymap_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
86 +#if JS_VERSION >= 185
87 +keymap_get_property(JSContext *ctx, JSObject *obj, jsid iid, jsval *vp)
89 +keymap_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
92 unsigned char *action_str;
93 const unsigned char *keystroke_str;
95 +#if JS_VERSION >= 185
97 + if (!JS_IdToValue(ctx,iid,&id))
101 /* This can be called if @obj if not itself an instance of the
102 * appropriate class but has one in its prototype chain. Fail
105 /* @keymap_class.setProperty */
107 -keymap_set_property(JSContext *ctx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
108 +#if JS_VERSION >= 185
109 +keymap_set_property(JSContext *ctx, JSObject *obj, jsid iid, JSBool strict, jsval *vp)
111 +keymap_set_property(JSContext *ctx, JSObject *obj, jsval id, JSBool strict, jsval *vp)
115 unsigned char *keymap_str;
116 const unsigned char *keystroke_str;
117 +#if JS_VERSION >= 185
119 + if (!JS_IdToValue(ctx,iid,&id))
123 /* This can be called if @obj if not itself an instance of the
124 * appropriate class but has one in its prototype chain. Fail