The JavaScript String scanner logic in Agent#every_javascript_string is very naive and cannot handle tested template literals (ex: `foo ${`bar ${1+1}`}`). It should eventually be replaced with a real JavaScript lexer or parser. It must support >= ES6 (inline regexes, template literals, async/await keywords, etc). Ideally the lexer or parser should be pure-Ruby for JRuby compatibility.
If no suitable JavaScript lexer or parser exists, then we could build one using parslet. If we only need to extract JavaScript String literals and comments, but not fully parse template literals, then we could write a JavaScript lexer using StringScanner.
See ECMA 9.0 spec for a description of the ECMA 9.0 syntax and grammar.