From 2adffa7970c173b3dc23c46faa728788b5605057 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 29 Jun 2021 22:08:02 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- object.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/object.js b/object.js index e56a783..99db732 100755 --- a/object.js +++ b/object.js @@ -1015,9 +1015,11 @@ function Constructor(name, a, b, c){ _constructor.name = name // just in case the browser/node refuses to change the name, we'll make // them a different offer ;) + // NOTE: it is not possible to abstract this eval(..) into something + // like renameFunction(..) as reconstructing the function will + // lose it's closure that we depend on here... // NOTE: this eval(..) should not be a risk as its inputs are // static and never infuenced by external inputs... - // NOTE: this will fail with non-identifier names... _constructor.name != name && (_constructor = eval('('+ _constructor