browser_dbg-breakpoints-reloading.js fails intermittently unless an unused inline script is added in the test document
Categories
(DevTools :: Debugger, task, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
Details
See https://bugzilla.mozilla.org/show_bug.cgi?id=1592839#c37 for more context.
We had to modify a test document in order to silence an intermittent, but it's not clear why this works.
Basically the test tries to set a breakpoint on a JS line in a HTML document, but this fails frequently (permanently on linux debug fission apparently) unless we add a new script below the line where we try to set the breakpoint.
Maybe the line is not considered as debuggable?
diff --git a/devtools/client/debugger/test/mochitest/examples/doc-scripts.html b/devtools/client/debugger/test/mochitest/examples/doc-scripts.html
--- a/devtools/client/debugger/test/mochitest/examples/doc-scripts.html
+++ b/devtools/client/debugger/test/mochitest/examples/doc-scripts.html
@@ -25,6 +25,7 @@
// This is a second inline script element whose breakpoints won't be
// known until after the script element has been added.
var x = 3;
+ inline_script2 = function () { var x = 5; };
</script>
</body>
</html>
Comment 1•5 years ago
|
||
I'll dig into this when I'm triaging bugs for reviewing our source-file handling.
My guess is:
- The HTML file loads
- The devtools opens
- The <script> has already run and been GCed
We currently have logic to handle this by re-fetching the HTML and re-parsing the scripts, but it could easily be that something is broken in there somewhere.
Comment 2•5 years ago
|
||
It looks like the logic to re-parse scripts should be working for this HTML file, but the URL information we need to fetch and re-parse the file is cleared if a shrinking GC were to run, so I'd only expect the breakpoint failure behavior that causes the test failure if a shrinking GC happened after the page has loaded and before the devtools have opened for the page.
Does anyone know if that's something that is particularly likely? I don't have a sense for when shrinking GC may be triggered.
Reporter | ||
Comment 3•4 years ago
|
||
I don't know either and the logs are not showing any sign of GC happening during the test (although I am not sure if they do show up usually)
Comment 4•4 years ago
|
||
I'm not sure what more I can add for this right now.
Description
•