From b1747feb5779ad2918dd72937a447c6481b7ceda Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Thu, 2 Mar 2023 08:23:23 -0500 Subject: [PATCH] url: set `formatUrl` method as no side effect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/46884 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Tobias Nießen --- src/node_url.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_url.cc b/src/node_url.cc index 1e8f6772fb8e6e..014a758b7df258 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -313,7 +313,7 @@ void Initialize(Local target, void* priv) { SetMethod(context, target, "parse", Parse); SetMethod(context, target, "updateUrl", UpdateUrl); - SetMethod(context, target, "formatUrl", FormatUrl); + SetMethodNoSideEffect(context, target, "formatUrl", FormatUrl); SetMethodNoSideEffect(context, target, "domainToASCII", DomainToASCII); SetMethodNoSideEffect(context, target, "domainToUnicode", DomainToUnicode);