User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/18.104.22.168 Safari/530.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b99) Gecko/20090605 Firefox/3.5b99 Running a process once will work. However, any subsequent tries will fail giving the error: [Exception... "Component returned failure code: 0xc1f30002 (NS_ERROR_ALREADY_INITIALIZED) [nsIProcess.init]" nsresult: "0xc1f30002 (NS_ERROR_ALREADY_INITIALIZED)" location: "JS frame :: file:///C:/nsIProcess_test.html :: testProcess :: line 10" data: no] This is breaking key functionality right now in FireFTP. In FireFTP, you can use "Open With" to open a file with an application of your choice. This works fine in Firefox 3.0.11 I will submit a test case showing the problem in a sec. Reproducible: Always
Created attachment 382925 [details] Test case showing the problem 1.) Click "Run Notepad". Notepad will open. 2.) Close Notepad. 3.) Click "Run Notepad" again - nsIProcess will throw an exception. This is a regression as this works as expected in Firefox 3.0
Regression range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=57b3bf2ebce3&tochange=f2816d1a110d
In the improvements to nsIProcess for 3.5 we made them non-reusable. You'll need to create a new instance to run a new process.
Ahh, I see - so instead of getService you have to use createInstance now. Gotcha. Thank you for clearing that up - sorry to raise an alarm.
Actually you should have always been using createInstance