Deprecated Catapult GitHub. Please instead use http://crbug.com "Speed>Benchmarks" component for bugs and https://chromium.googlesource.com/catapult for downloading and editing source code..
In transformers.go--> NewScriptInjector:
// Remove C-style comments.
script = jsMultilineCommentRE.ReplaceAllLiteral(script, []byte(""))
script = jsSinglelineCommentRE.ReplaceAllLiteral(script, []byte(""))
for oldstr, newstr := range replacements {
script = bytes.Replace(script, []byte(oldstr), []byte(newstr), -1)
}
Removes all '//' whether they are comments or not.
e.g. endpoint = "http://example.com/index.php" is transformed to
endpoint = "http:"
In transformers.go--> NewScriptInjector: // Remove C-style comments. script = jsMultilineCommentRE.ReplaceAllLiteral(script, []byte("")) script = jsSinglelineCommentRE.ReplaceAllLiteral(script, []byte("")) for oldstr, newstr := range replacements { script = bytes.Replace(script, []byte(oldstr), []byte(newstr), -1) } Removes all '//' whether they are comments or not. e.g. endpoint = "http://example.com/index.php" is transformed to endpoint = "http:"