Open Bug 1747819 Opened 4 years ago Updated 1 year ago

Cover the behavior of the debugger with distinct source sharing the same URL

Categories

(DevTools :: Debugger, task)

task

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

Details

The current behavior of the debugger when we have many source sharing the same URL is slightly unknown and probably facing bugs.
We don't have frontend tests covering usecase where many distinct scripts are loaded from the same URL.
For example:

  • many script tag using the same URL
  • the script tag may be added in html markup -or- at runtime via JS by dynamically creating a <script> tag
  • use eval("... //# sourceURL=xxx.js") with the same sourceURL
    And if you consider the same url, with in another thread:
  • a worker using the same url
  • an iframe (remote or not) loading the same url (via script tag, or eval with sourceURL)

The theory is that all the sources with share a unique source object in sources.js reducer.
And we will spawn distinct one for each additional thread (iframe, worker).
But very few code actually acknowledge that we may have more than one source for the same url. So we probably have bugs around this.
In any case, each script will be related to a dedicated spidermonkey's Debugger.Source object, itself being related to one dedicated SourceActor, itself being mapped to one entry in source-actor.js reducer.

See Also: → 1910624
You need to log in before you can comment on or make changes to this bug.