Open
Bug 1466241
Opened 7 years ago
Updated 3 years ago
Get rid of Components.utils.unload()
Categories
(Core :: XPConnect, enhancement, P3)
Core
XPConnect
Tracking
()
NEW
People
(Reporter: mccr8, Unassigned)
Details
Components.utils.unload is supposed to unload an existing JSM, but if you have any references to it, the JSM will continue to exist. The behavior seems weird, though. If you look at the commit message for bug 1351690, part 1b, I was hitting an intermittent failure in some PDF.js code that uses unload. It seemed like the scope for the JSM was getting cleared, so while I still had a reference to the unloaded JSM, if I tried to use it I would sometimes get an error saying that a top level function in the JSM did not exist.
It feels like we should get rid of this method, if we can. It looks like unload was added in bug 481603.
Reporter | ||
Updated•7 years ago
|
Priority: -- → P3
Comment 1•7 years ago
|
||
We can't get rid of it, since it's still used by a bunch of tests. We could perhaps make it test-only, though.
And, yeah, I noticed the weird use by pdf.js, too. That was clearly an abuse. I'm not sure how it ever passed review.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•