mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[js] segfault when spidermonkey nor quickjs were enabled
This commit is contained in:
parent
3af789e9e6
commit
89238867f2
@ -208,7 +208,7 @@ void
|
|||||||
html_script(struct html_context *html_context, char *a,
|
html_script(struct html_context *html_context, char *a,
|
||||||
char *html, char *eof, char **end)
|
char *html, char *eof, char **end)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ECMASCRIPT
|
#if defined(CONFIG_ECMASCRIPT_SMJS) || defined(CONFIG_QUICKJS)
|
||||||
/* TODO: <noscript> processing. Well, same considerations apply as to
|
/* TODO: <noscript> processing. Well, same considerations apply as to
|
||||||
* CSS property display: none processing. */
|
* CSS property display: none processing. */
|
||||||
/* TODO: Charsets for external scripts. */
|
/* TODO: Charsets for external scripts. */
|
||||||
@ -219,7 +219,7 @@ html_script(struct html_context *html_context, char *a,
|
|||||||
|
|
||||||
html_skip(html_context, a);
|
html_skip(html_context, a);
|
||||||
|
|
||||||
#ifdef CONFIG_ECMASCRIPT
|
#if defined(CONFIG_ECMASCRIPT_SMJS) || defined(CONFIG_QUICKJS)
|
||||||
if (html_context->was_xml_parsed) {
|
if (html_context->was_xml_parsed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1136,7 +1136,7 @@ html_noscript(struct html_context *html_context, char *a,
|
|||||||
{
|
{
|
||||||
/* We shouldn't throw <noscript> away until our ECMAScript support is
|
/* We shouldn't throw <noscript> away until our ECMAScript support is
|
||||||
* halfway decent. */
|
* halfway decent. */
|
||||||
#ifdef CONFIG_ECMASCRIPT
|
#if defined(CONFIG_ECMASCRIPT_SMJS) || defined(CONFIG_QUICKJS)
|
||||||
if (get_opt_bool("ecmascript.enable", NULL)
|
if (get_opt_bool("ecmascript.enable", NULL)
|
||||||
&& get_opt_bool("ecmascript.ignore_noscript", NULL))
|
&& get_opt_bool("ecmascript.ignore_noscript", NULL))
|
||||||
html_skip(html_context, a);
|
html_skip(html_context, a);
|
||||||
|
Loading…
Reference in New Issue
Block a user