Bug 1114752 - Uplift Add-on SDK to Firefox a=me

This commit is contained in:
Erik Vold
2015-02-03 09:51:16 -08:00
parent 26486d7255
commit bd05d2922a
349 changed files with 16843 additions and 4402 deletions

View File

@@ -25,8 +25,9 @@ const FM = Cc["@mozilla.org/focus-manager;1"].
const XUL_NS = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';
const prefs = require("../preferences/service");
const BROWSER = 'navigator:browser',
URI_BROWSER = 'chrome://browser/content/browser.xul',
URI_BROWSER = prefs.get('browser.chromeURL', null),
NAME = '_blank',
FEATURES = 'chrome,all,dialog=no,non-private';
@@ -186,6 +187,9 @@ function open(uri, options) {
uri = uri || URI_BROWSER;
options = options || {};
if (!uri)
throw new Error('browser.chromeURL is undefined, please provide an explicit uri');
if (['chrome', 'resource', 'data'].indexOf(io.newURI(uri, null, null).scheme) < 0)
throw new Error('only chrome, resource and data uris are allowed');