Closed Bug 1191188 Opened 9 years ago Closed 4 years ago

Debugger does not show sources that have been reclaimed by GC

Categories

(DevTools :: Debugger, defect, P5)

39 Branch
x86_64
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: github.wsot, Unassigned)

References

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

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36 Steps to reproduce: 1. Open http://digitalfeed.net/chromium_issue_415406.html 2. From the hamburger menu, choose Developer/Toggle Tools (to open developer tools) 3. Select the 'Debugger' tab 4. Observe with displeasure that not all scripts are displayed (If you refresh with the Debugger open, all scripts will appear) On Mac OSX. Actual results: In Debugger tab, only the first script is shown, not the second Expected results: Both scripts should have appeared in the Debugger
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
Also present on: Win 7 x86_64 Firefox 39 Win 7 x86_64 Firefox 40 (Beta) Win 7 x86_64 Firefox 41 (Aurora)
*May* only occur when the body tag of the IFrame is empty? Occurs on: http://digitalfeed.net/chromium_issue_415406.html Never seems to occur on: http://digitalfeed.net/firefox_issue_1.html http://digitalfeed.net/firefox_issue_2.html Which are virtually identical, but have content in the body tag.
Component: Untriaged → Developer Tools: Debugger
I suspect that the missing sources have been garbage collected. Are they defining any functions on the window?
Yes, confirmed that the missing iframe's source does not define any functions that stay alive, and so it gets reclaimed by the GC. This shouldn't be specific to iframes.
Depends on: 944260, 944261
Summary: Not all scripts inside IFrame displayed when dev tools opened (until refresh) → Debugger does not show sources that have been reclaimed by GC
This is very difficult to debug because it appears to be random and could be from the C++ side? (also this is not iframe specific, I've seen it in other areas) === transport.js === Why does the orginal packet include 6 sources when there is only 2 to display? I was trying to set a breakpoint if the sources.length < 2. === debugger-controller.js : _onSourcesAdded: function(aResponse)=== aResponse.sources.length = 6 // aRespone.sources includes duplicates // Add all the sources in the debugger view sources container. for (let source of aResponse.sources) { // Ignore bogus scripts, e.g. generated from 'clientEvaluate' packets. if (NEW_SOURCE_IGNORED_URLS.indexOf(source.url) == -1) { DebuggerView.Sources.addSource(source, { staged: true }); } } === sources-view.js : 183 ===
This seems like a complicated bug. Is there anyway to use a test case or conditional breakpoint? We are seeing 6 scripts (with duplicates) when there are only 2 and sometimes there is 1 missing (the main problem). After several page reloads (see screen shot) you can get up to 10 scripts. ==== debugger-controller.js : _onNewSource: function(aNotification, aPacket) === Is there a way to set a conditional breakpoint and check the number of scripts in the packet?
Attached image Too Many is sometimes Not Enough (deleted) —
Product: Firefox → DevTools
Blocks: dbg-api
Priority: -- → P5
Depends on: 1571592
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: