load_rc: allow chrome and file uris
commit7337b2f87304984cd92cc3cb9e9f7bc5d1391212
authorDavid Kettler <kettler@internode.on.net>
Fri, 11 Dec 2009 07:51:21 +0000 (11 18:21 +1030)
committerDavid Kettler <kettler@internode.on.net>
Fri, 11 Dec 2009 07:51:21 +0000 (11 18:21 +1030)
tree6e2c9a536c6ef76134b2aa989d03783dac97cfc0
parent23a7f625de05667033fc076ad045de03d39aa407
load_rc: allow chrome and file uris

load_rc() will now accept a number of ways to specify the file to
load.  In particular this allows loading from chrome uris on the
command line.  The code tries to produce an nsILocalFile from whatever
it's given so that, for instance, the directory processing works for
chrome uris too.

The subscript loader will refuse to load a non-local uri.

A chrome uri is provided for the test suite, which allows usage like:

  conkeror -q -batch -l chrome://conkeror-test/content/simple

Another usage is to load a module from the contrib area:

  load_rc("chrome://conkeror-contrib/content/mode-line-buttons.js");
chrome/chrome.manifest
modules/command-line.js
modules/rc.js
modules/utils.js