mozilla/addon-sdk — pull request #1012 by campd (2013-05-29 21:56:05+00:00)
Title: Bug 877413: Add an addPath to toolkit/loader.

We want the devtools server loader to load all extensions to the server in its own loader, for a few reasons:

a) We want to be able to identify all globals associated with the loader so we can avoid debugging ourselves during chrome debugging.
b) We want to be able to load multiple copies of the server so that we can debug the debugging server.

So we want tests and extensions to be able to add URIs that can be loaded. A few options that would be acceptable are:

a) require("resource://fully/qualified/url");
b) defineModule(loader, "extensionpath/module", "resource://extensionuri/module.js"); require("extensionpath/module");
c) addPath(loader, "extensionpath/", "resource://extensionuri/"); require("extensionpath/module");

c) seems the simplest, so this pull request that does that.