mirror of
https://github.com/rkd77/elinks.git
synced 2024-06-28 01:35:32 +00:00
[form] detach form view
This commit is contained in:
parent
a85fec3aef
commit
30f7601650
|
@ -2674,7 +2674,7 @@ form_get_form_view(JSContext *ctx, JS::HandleObject r_jsform, JS::Value *argv)
|
||||||
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
|
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
|
||||||
#endif
|
#endif
|
||||||
struct form_view *fv = JS_GetInstancePrivate(ctx, r_jsform,
|
struct form_view *fv = JS_GetInstancePrivate(ctx, r_jsform,
|
||||||
&form_class,
|
&form_elements_class,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!fv) return NULL; /* detached */
|
if (!fv) return NULL; /* detached */
|
||||||
|
|
|
@ -353,7 +353,7 @@ find_form_by_form_view(struct document *document, struct form_view *fv)
|
||||||
void
|
void
|
||||||
done_form_state(struct form_state *fs)
|
done_form_state(struct form_state *fs)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ECMASCRIPT_SMJS
|
#if defined(CONFIG_ECMASCRIPT) || defined(CONFIG_ECMASCRIPT_SMJS)
|
||||||
ecmascript_detach_form_state(fs);
|
ecmascript_detach_form_state(fs);
|
||||||
#endif
|
#endif
|
||||||
mem_free_if(fs->value);
|
mem_free_if(fs->value);
|
||||||
|
@ -365,7 +365,7 @@ done_form_state(struct form_state *fs)
|
||||||
void
|
void
|
||||||
done_form_view(struct form_view *fv)
|
done_form_view(struct form_view *fv)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ECMASCRIPT_SMJS
|
#if defined(CONFIG_ECMASCRIPT) || defined(CONFIG_ECMASCRIPT_SMJS)
|
||||||
ecmascript_detach_form_view(fv);
|
ecmascript_detach_form_view(fv);
|
||||||
#endif
|
#endif
|
||||||
mem_free(fv);
|
mem_free(fv);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user