1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[quickjs] compilation fix

This commit is contained in:
Witold Filipczyk 2023-09-12 15:39:26 +02:00
parent 496bfcea60
commit 80e2b6b812

View File

@ -645,6 +645,7 @@ js_document_get_property_referrer(JSContext *ctx, JSValueConst this_val)
struct document_view *doc_view;
struct document *document;
struct session *ses;
char *str;
vs = interpreter->vs;
if (!vs) {
@ -668,7 +669,7 @@ js_document_get_property_referrer(JSContext *ctx, JSValueConst this_val)
case REFERER_TRUE:
/* XXX: Encode as in add_url_to_httset_prop_string(&prop, ) ? --pasky */
if (ses->referrer) {
char *str = get_uri_string(ses->referrer, URI_HTTP_REFERRER);
str = get_uri_string(ses->referrer, URI_HTTP_REFERRER);
if (str) {
JSValue ret = JS_NewString(ctx, str);
@ -682,7 +683,7 @@ js_document_get_property_referrer(JSContext *ctx, JSValueConst this_val)
break;
case REFERER_SAME_URL:
char *str = get_uri_string(document->uri, URI_HTTP_REFERRER);
str = get_uri_string(document->uri, URI_HTTP_REFERRER);
if (str) {
JSValue ret = JS_NewString(ctx, str);