# HG changeset patch
# User Edouard Tisserant
# Date 1585559172 -7200
# Node ID 3d7e3866cc51fc89cdf870ad217a1399452f08cc
# Parent 92d115d8828da6ce3ca9a97bac34e31e8bc24271
SVGHMI: prevent man-made memory leak by limiting back button history items count to 42
diff -r 92d115d8828d -r 3d7e3866cc51 svghmi/gen_index_xhtml.xslt
--- 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 @@
jump_history.push([page_name, page_index]);
+ if(jump_history.length > 4)
+
+ jump_history.shift();
+
return true;
diff -r 92d115d8828d -r 3d7e3866cc51 svghmi/svghmi.js
--- 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;
};