0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-06-30 22:19:29 -04:00

Make SpiderMonkey consistent with SEE. Do not cache ecmascript_objs

[ Backported from commit b4d9b7f5a60a64a26fcfffcb66a376cae5b31bc1 in
  ELinks 0.12.GIT, to fix bug 956.  --KON ]
This commit is contained in:
witekfl 2006-01-30 11:15:04 +01:00 committed by Kalle Olavi Niemitalo
parent 19831ea185
commit 3faeda97cb

View File

@ -481,7 +481,10 @@ input_select(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval
static JSObject *
get_input_object(JSContext *ctx, JSObject *jsform, struct form_state *fs)
{
if (!fs->ecmascript_obj) {
#if 0
if (fs->ecmascript_obj)
return fs->ecmascript_obj;
#endif
/* jsform ('form') is input's parent */
/* FIXME: That is NOT correct since the real containing element
* should be its parent, but gimme DOM first. --pasky */
@ -491,7 +494,6 @@ get_input_object(JSContext *ctx, JSObject *jsform, struct form_state *fs)
JS_DefineFunctions(ctx, jsinput, (JSFunctionSpec *) input_funcs);
JS_SetPrivate(ctx, jsinput, fs); /* to @input_class */
fs->ecmascript_obj = jsinput;
}
return fs->ecmascript_obj;
}
@ -1044,7 +1046,10 @@ form_submit(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
JSObject *
get_form_object(JSContext *ctx, JSObject *jsdoc, struct form_view *fv)
{
if (!fv->ecmascript_obj) {
#if 0
if (fv->ecmascript_obj)
return fv->ecmascript_obj;
#endif
/* jsdoc ('document') is fv's parent */
/* FIXME: That is NOT correct since the real containing element
* should be its parent, but gimme DOM first. --pasky */
@ -1054,7 +1059,6 @@ get_form_object(JSContext *ctx, JSObject *jsdoc, struct form_view *fv)
JS_DefineFunctions(ctx, jsform, (JSFunctionSpec *) form_funcs);
JS_SetPrivate(ctx, jsform, fv); /* to @form_class */
fv->ecmascript_obj = jsform;
}
return fv->ecmascript_obj;
}
static JSBool forms_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp);