Open Bug 1520623 Opened 5 years ago Updated 2 years ago

Avoid invalid view-source links in the console


(DevTools :: Console, enhancement, P2)



(Not tracked)


(Reporter: bhackett1024, Unassigned)


(Blocks 1 open bug)



(1 file)

Bug 1447244 makes link processing in console errors and API calls more robust, allowing links to go to sources with invalid URLs like those generated for eval code. The solution in bug 1447244 does not work in all cases, however. If a source is GC'ed before the console is opened, we will still only have the invalid URL. The coverage in bug 1447244 is also incomplete and some messages will only have URL information and not source tags.

In cases like this, it would be good if we did not have clickable links to these invalid URLs. I think there is already some logic related to this in the client (rather, I saw it but now I can't find it) but it either still allows these invalid URLs through or is not consulted every time we might show include a source link.

Priority: -- → P2

Brian, could you provide an STR?

Flags: needinfo?(bhackett1024)
Attached file testcase


  1. Open the attached file in a tab.
  2. In another tab, visit about:memory and press the GC button.
  3. In the original tab, open the console and click the source location associated with the console message.

This should open an invalid view-source tab, because the evaluated source has been GC'ed by the time we open the devtools. If no GC happens, or if the devtools are opened before the GC occurs, then clicking the source location should go to the eval'ed source in the debugger pane.

Flags: needinfo?(bhackett1024)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.