erikvold/addon-pathfinder — pull request #7 by clarkbw (2013-07-18 18:40:25+00:00)
Title: Userstyles unloader alt

Here's the alternate implementation to the previous pull request. A dictionary object keeps a reference to the unload callback which removes the unload function from the unload queue. When a URL is manually unregistered we slice that unneeded unloader from the queue ensuring we won't run an unneeded unregister call during the unload event. This method should require a bit more scrutiny since it's more complex than the previous version but it doesn't allow callers to fill up the unload queue with a bunch of useless calls.