Open Bug 875561 Opened 11 years ago Updated 2 years ago

Browser debugger should not update Firefox

Categories

(DevTools :: Debugger, defect, P3)

x86_64
Windows 7
defect

Tracking

(Not tracked)

People

(Reporter: mossop, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [chrome-debug])

At some time today Firefox downloaded the nightly update in the background. When I launched the browser debugger it showed an escalation window and then applied the update, all while Firefox was still running. That's generally bad. We should probably have the browser debugger process skip attempting to apply downloaded updates.
I think setting app.update.enabled or app.update.auto to false in the profile of the browser debugger process would accomplish this, but IIRC we couldn't modify the profile on process launch, just clone the existing one. Is there a command line parameter we can use to the same effect?
Not that I know of. I'm surprised though, I thought the update code did checks to make sure it wasn't updating a running instance. Copying some of the update guys.
We now allow an update of the browser to occur while another instance is open. This is important because on Windows 8, metro our metro browser is going to be almost always open. See bug 794937's contents for more info. (In reply to Dave Townsend (:Mossop) from comment #0) > When I launched the browser debugger it showed an escalation > window and then applied the update, In general this is WONTFIX, but I'm not sure about the quoted comment. Maybe there is some case you don't want a staged update to be applied.
(In reply to Brian R. Bondy [:bbondy] from comment #3) > We now allow an update of the browser to occur while another instance is > open. > This is important because on Windows 8, metro our metro browser is going to > be almost always open. See bug 794937's contents for more info. > > (In reply to Dave Townsend (:Mossop) from comment #0) > > When I launched the browser debugger it showed an escalation > > window and then applied the update, > > In general this is WONTFIX, but I'm not sure about the quoted comment. > Maybe there is some case you don't want a staged update to be applied. Well it is odd to see an escalation warning when starting the browser debugger with no obvious reason why, the same could be said for Firefox itself though. If it's now safe to install updates while the process is running (it didn't used to be) then I guess this is a wontfix.
What are the steps to start the browser debugger? I thought it was just a pane that comes up at the bottom of the Window. Does it start firefox.exe with some command line? In which case we could add code to not apply staged updates when that command line is present.
Tools -> Web Developer -> Browser Debugger launches a separate process in a profile cloned from the current one. Here is the function that starts the new process: http://mxr.mozilla.org/mozilla-central/source/browser/devtools/debugger/DebuggerUI.jsm#464
(In reply to Panos Astithas [:past] from comment #6) > Tools -> Web Developer -> Browser Debugger launches a separate process in a > profile cloned from the current one. Here is the function that starts the > new process: > > http://mxr.mozilla.org/mozilla-central/source/browser/devtools/debugger/ > DebuggerUI.jsm#464 I'm not sure if it's necessarily a clone of the current profile though. It might be just one with the default prefs.
I have a Tools -> Web Developer -> Debugger which launches a pane at the bottom of my window, but I have no Tools -> Web Developer -> Browser Debugger.
ah I see: devtools.chrome.enabled: true devtools.debugger.remote-enabled: true
I think we should keep this open to bypass applying staged updates in this case
Whiteboard: [chrome-debug]
Priority: -- → P3
Also, when clicking a link in the Browser Toolbox, it will actually open it in a blank profile (the debugger profile) instead of the currently used profile.
Summary: Starting the browser debugger upgraded Firefox → Browser debugger should not update Firefox
Product: Firefox → DevTools
Blocks: dbg-chrome

Before the debugger launches it can do something along the lines of the following

let um = Cc["@mozilla.org/updates/update-manager;1"].
         getService(Ci.nsIUpdateManager);
if (um.activeUpdate) {
prompt the user whether they want to discard the update and if yes
  let aus = Cc["@mozilla.org/updates/update-service;1"].
          getService(Ci.nsIApplicationUpdateService);
  aus.stopDownload();
  um.cleanupActiveUpdate();
}
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.