Bug 1114752 - Uplift Add-on SDK to Firefox a=me
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user