From 80e2b6b812b45b9715e3f127cf409c405d5cbbef Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Tue, 12 Sep 2023 15:39:26 +0200 Subject: [PATCH] [quickjs] compilation fix --- src/ecmascript/libdom/quickjs/document.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ecmascript/libdom/quickjs/document.c b/src/ecmascript/libdom/quickjs/document.c index 86e885f4a..2733edd91 100644 --- a/src/ecmascript/libdom/quickjs/document.c +++ b/src/ecmascript/libdom/quickjs/document.c @@ -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);