Open Bug 1649886 Opened 4 years ago Updated 4 years ago

Instant-eval can create ScriptSource objects that are visible after refresh

Categories

(DevTools :: Console, defect)

defect

Tracking

(Not tracked)

People

(Reporter: loganfsmyth, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Steps:

  1. Open any page, e.g. http://example.com
  2. Paste console.log('bail'); //# sourceURL=http://google.com/fake12345.js into the webconsole without executing.
  3. Close devtools
  4. Open devtools again

Actual:
After reopening the devtools, the evalled source is visible in the tree under the URL "http://google.com/fake12345.js"

Expected:
After re-opening the devtools, there should be no source in the tree for the URL "http://mozilla.com/fake12345.js".

Not sure what the right fix for this is. We don't show evalled sources in the tree and since 99% of users won't know exists /# sourceURL=, this is pretty low-priority. By definition, an eval-like call is always going to introduce a new source, and the console needs to do that, so potentially we need to flag any source created during an instant-eval so that it can be excluded from the Debugger's results when searching for sources and scripts on devtools load.

This issue is also visible with eval() calls triggered by instant-eval.

Depends on: 1625069

The severity field is not set for this bug.
:nchevobbe, could you have a look please?

For more information, please visit auto_nag documentation.

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