mirror of
https://github.com/rkd77/elinks.git
synced 2025-05-18 00:48:57 -04:00
Make SpiderMonkey consistent with SEE. Do not cache ecmascript_objs
This commit is contained in:
parent
44710bb1e9
commit
b4d9b7f5a6
@ -385,7 +385,10 @@ input_select(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval
|
|||||||
static JSObject *
|
static JSObject *
|
||||||
get_input_object(JSContext *ctx, JSObject *jsform, struct form_state *fs)
|
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 */
|
/* jsform ('form') is input's parent */
|
||||||
/* FIXME: That is NOT correct since the real containing element
|
/* FIXME: That is NOT correct since the real containing element
|
||||||
* should be its parent, but gimme DOM first. --pasky */
|
* should be its parent, but gimme DOM first. --pasky */
|
||||||
@ -395,7 +398,6 @@ get_input_object(JSContext *ctx, JSObject *jsform, struct form_state *fs)
|
|||||||
JS_DefineFunctions(ctx, jsinput, (JSFunctionSpec *) input_funcs);
|
JS_DefineFunctions(ctx, jsinput, (JSFunctionSpec *) input_funcs);
|
||||||
JS_SetPrivate(ctx, jsinput, fs);
|
JS_SetPrivate(ctx, jsinput, fs);
|
||||||
fs->ecmascript_obj = jsinput;
|
fs->ecmascript_obj = jsinput;
|
||||||
}
|
|
||||||
return fs->ecmascript_obj;
|
return fs->ecmascript_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -815,7 +817,10 @@ form_submit(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
|||||||
JSObject *
|
JSObject *
|
||||||
get_form_object(JSContext *ctx, JSObject *jsdoc, struct form_view *fv)
|
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 */
|
/* jsdoc ('document') is fv's parent */
|
||||||
/* FIXME: That is NOT correct since the real containing element
|
/* FIXME: That is NOT correct since the real containing element
|
||||||
* should be its parent, but gimme DOM first. --pasky */
|
* should be its parent, but gimme DOM first. --pasky */
|
||||||
@ -825,7 +830,6 @@ get_form_object(JSContext *ctx, JSObject *jsdoc, struct form_view *fv)
|
|||||||
JS_DefineFunctions(ctx, jsform, (JSFunctionSpec *) form_funcs);
|
JS_DefineFunctions(ctx, jsform, (JSFunctionSpec *) form_funcs);
|
||||||
JS_SetPrivate(ctx, jsform, fv);
|
JS_SetPrivate(ctx, jsform, fv);
|
||||||
fv->ecmascript_obj = jsform;
|
fv->ecmascript_obj = jsform;
|
||||||
}
|
|
||||||
return fv->ecmascript_obj;
|
return fv->ecmascript_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user