alerma | 23 Jun 13:42
Picon

Marking and tracking variables

Hello,

I am working on a project where we need to mark some sensitive
information in JavaScript and track these markers through various
operations, like assignments, concatenations, etc.

Consider the following example:

var a = 'a';
var b = new String('b');
b.marker = 1;
var c = 'c';
var d = a + b + c;

Is it possible to pass the marker through concatenation and
assignment
op so that it will appear at variable d? As far as I know there is no
way to overload + operator in JavaScript? Is it correct?
Is there any possible way to do it without modifying SpideMonkey's
source code?

Thanks,
Alex

Gmane