Closed
Bug 512444
Opened 15 years ago
Closed 6 years ago
Figure out if mozapps/extensions unit tests can use do_shutdown
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
INVALID
People
(Reporter: ehsan.akhgari, Unassigned)
References
Details
This line <http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/test/unit/test_bug430120.js#100> might be able to use the do_shutdown function to be added in bug 411415. I tried calling do_shutdown there but the test crashed. It might be worth investigating if it's possible to use do_shutdown there. Also, it seems that the shutdownEM function assumes that the xpcshell suite automatically sends out xpcom-shutdown, but this assumption is not correct.
Comment 1•15 years ago
|
||
(In reply to comment #0) > Also, it seems that the shutdownEM function assumes that the xpcshell suite > automatically sends out xpcom-shutdown, but this assumption is not correct. Are you sure about that? I was under the impression (and I'm pretty sure I verified at the time) that when XPCOM gets shut down the xpcom-shutdown notification is sent. Maybe with no explicit act by xpcshell, but sent nonetheless.
Reporter | ||
Comment 2•15 years ago
|
||
(In reply to comment #1) > (In reply to comment #0) > > Also, it seems that the shutdownEM function assumes that the xpcshell suite > > automatically sends out xpcom-shutdown, but this assumption is not correct. > > Are you sure about that? I was under the impression (and I'm pretty sure I > verified at the time) that when XPCOM gets shut down the xpcom-shutdown > notification is sent. Maybe with no explicit act by xpcshell, but sent > nonetheless. I'm pretty sure, but Ted or Serge might know better. I just verified my own claim by a simple test program: function run_test() { var os = Cc["@mozilla.org/observer-service;1"]. getService(Ci.nsIObserverService); var observer = { observe: function (aSubject, aTopic, aData) { do_throw("shouldn't get any notifications"); } }; os.addObserver(observer, "*", false); } This clearly shows that xpcshell harness by default doesn't send any kind of notifications.
Comment 3•15 years ago
|
||
(In reply to comment #2) > (In reply to comment #1) > > (In reply to comment #0) > > > Also, it seems that the shutdownEM function assumes that the xpcshell suite > > > automatically sends out xpcom-shutdown, but this assumption is not correct. > > > > Are you sure about that? I was under the impression (and I'm pretty sure I > > verified at the time) that when XPCOM gets shut down the xpcom-shutdown > > notification is sent. Maybe with no explicit act by xpcshell, but sent > > nonetheless. > > I'm pretty sure, but Ted or Serge might know better. It doesn't matter, seems immaterial to this bug anyway
Comment 4•14 years ago
|
||
xpcshell sends xpcom-shutdown, and if you invoke do_get_profile it will also fire profile-change-net-teardown, profile-change-teardown and profile-before-change.
Comment 5•6 years ago
|
||
The link here is no longer works and I can't find any reference to do_shutdown() in the tree, I think this can be safely declared obsolete.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•