SVGHMI: prevent man-made memory leak by limiting back button history items count to 42
--- a/svghmi/gen_index_xhtml.xslt Sun Mar 29 16:11:21 2020 +0200
+++ b/svghmi/gen_index_xhtml.xslt Mon Mar 30 11:06:12 2020 +0200
@@ -1903,6 +1903,10 @@
</xsl:text>
<xsl:text> jump_history.push([page_name, page_index]);
</xsl:text>
+ <xsl:text> if(jump_history.length > 4)
+</xsl:text>
+ <xsl:text> jump_history.shift();
+</xsl:text>
<xsl:text>
</xsl:text>
<xsl:text> return true;
--- a/svghmi/svghmi.js Sun Mar 29 16:11:21 2020 +0200
+++ b/svghmi/svghmi.js Mon Mar 30 11:06:12 2020 +0200
@@ -313,6 +313,8 @@
requestHMIAnimation();
jump_history.push([page_name, page_index]);
+ if(jump_history.length > 42)
+ jump_history.shift();
return true;
};