A string in the GC log like 'foo\n' gets recorded as having a length of 5, but the last character is actually '\n', not 'n', so the length should be 4. The main effect of this is that the string count can be wrong, sometimes showing up as 0. What needs to be done here is to figure out how the JS engine is escaping these strings, then unescape them and use that to compute string length.
A string in the GC log like 'foo\n' gets recorded as having a length of 5, but the last character is actually '\n', not 'n', so the length should be 4. The main effect of this is that the string count can be wrong, sometimes showing up as 0. What needs to be done here is to figure out how the JS engine is escaping these strings, then unescape them and use that to compute string length.