]> git.gir.st - VimFx.git/commit
Use `chrome://` URIs for `require()` calls
authorSimon Lydell <simon.lydell@gmail.com>
Tue, 26 Jan 2016 18:15:05 +0000 (19:15 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Tue, 26 Jan 2016 18:54:33 +0000 (19:54 +0100)
commitbd00a85e0d5eaff33677c122bf774c3e6667879c
treedb34b3bccaa13d670b8e0152e856fceb4a0f48b6
parent3010c08364c0fd9547aed1ab95b7efb7b7906d70
Use `chrome://` URIs for `require()` calls

Apparently, `chrome://` URIs registered in chrome.manifest cannot be used in
bootstrap.js until its `startup()` function is called. Therefore this commit
reorganizes the code of bootstrap.coffee a bit, so that actual work is done
inside `startup()` (where it is supposed to be, after all). Outside of that
function we now mostly simply declare variables that the `shutdown()` function
needs to access as well. Some things were moved into main.coffee as well.

- Using `chrome://` URIs is the way add-ons are "supposed" to do it.
- If a `require()` call fails, we now get much shorter URIs in the error
  message, making things easier to debug.
- This allows to get rid of the hack of sending `__SCRIPT_URI_SPEC__` to frame
  scripts.
extension/bootstrap.coffee
extension/lib/l10n.coffee
extension/lib/main.coffee
extension/lib/message-manager.coffee
extension/lib/utils.coffee
Imprint / Impressum