[devtools] Only strip //# sourceURL= lines at the end of the source.
[devtools] Only strip //# sourceURL= lines at the end of the source.

Previously the DevTools UI would strip out //# sourceURL=... and
//@ sourceURL=... lines from the script in the frontend no matter
where they showed up in the source code, which means that all the
positions after this line will be off by 1 between frontend
and backend. It's generally also very confusing to developers that
we're removing code from the script before showing it.

In general, we should just display exactly the code that the developer
wrote (similar to Firefox DevTools and Safari WebInspector), however
there's quite a bit of internal logic relying on the special handling
of sourceURL comments (at the end), for example when it comes to
snippets. So meanwhile we only remove the comments when they are found
at the end of the source code, which is where tools put them.

Bug: chromium:1003497
Change-Id: I4404e2f7b6b61d50f85e44bbd9e0ae56675670af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1840512
Commit-Queue: Benedikt Meurer <024a1e0af501338d11c3b837c6193d11c140d792@chromium.org>
Reviewed-by: Yang Guo <1cf0af8245a3a17a632a2c73531392b0f9761c76@chromium.org>
Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#703244}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 41700f354fcb17636b6d8a280a5f291423e22813

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend