mozilla / memchaser

Firefox extension to chase the memory usage and garbage collector activity
https://wiki.mozilla.org/QA/Automation_Services/Projects/Addons/MemChaser
29 stars 23 forks source link

Improve the way how we handle a restart if mem log pref is not set #18

Closed whimboo closed 12 years ago

whimboo commented 12 years ago

Currently I can see a failure right after starting Firefox, and after the necessary restart to enable the mem logging pref the backend exists when the first GC/CC message appear:

$ cfx run -b /Applications/Firefox/Aurora.app/ Using binary at '/Applications/Firefox/Aurora.app/Contents/MacOS/firefox-bin'. Using profile at '/var/folders/wd/zmy4z7xn7wd7sjq90z1y52f80000gn/T/tmpQOAQ6b.mozrunner'. nsSessionStore could not be initialized: [Exception... "'[JavaScript Error: "tabbrowser.tabs is undefined" {file: "resource:///components/nsSessionStore.js" line: 918}]' when calling method: [nsISessionStore::init]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://browser/content/browser.js :: delayedStartup :: line 5099" data: yes] Total time: 7.780082 seconds Program terminated successfully.

We should fix this by implementing a better logic to handle the restart. It should also be moved out from the garbage collector module into the main module.

whimboo commented 12 years ago

There is really no need for a restart. So Issue 39 will remove this code completely. We don't have to work on any fix here.