Backed out changeset 489046125fa6 (bug 897683) due to Ubuntu debug Jetpack perma-orange.
This commit is contained in:
@@ -18,8 +18,6 @@ const appShellService = Cc['@mozilla.org/appshell/appShellService;1'].
|
||||
getService(Ci.nsIAppShellService);
|
||||
const WM = Cc['@mozilla.org/appshell/window-mediator;1'].
|
||||
getService(Ci.nsIWindowMediator);
|
||||
const io = Cc['@mozilla.org/network/io-service;1'].
|
||||
getService(Ci.nsIIOService);
|
||||
|
||||
const BROWSER = 'navigator:browser',
|
||||
URI_BROWSER = 'chrome://browser/content/browser.xul',
|
||||
@@ -186,21 +184,18 @@ function serializeFeatures(options) {
|
||||
* Map of key, values like: `{ width: 10, height: 15, chrome: true, private: true }`.
|
||||
*/
|
||||
function open(uri, options) {
|
||||
uri = uri || URI_BROWSER;
|
||||
options = options || {}
|
||||
|
||||
if (['chrome', 'resource', 'data'].indexOf(io.newURI(uri, null, null).scheme) < 0)
|
||||
throw new Error('only chrome, resource and data uris are allowed');
|
||||
|
||||
options = options || {};
|
||||
let newWindow = windowWatcher.
|
||||
openWindow(options.parent || null,
|
||||
uri,
|
||||
uri || URI_BROWSER,
|
||||
options.name || null,
|
||||
serializeFeatures(options.features || {}),
|
||||
options.args || null);
|
||||
|
||||
return newWindow;
|
||||
}
|
||||
|
||||
|
||||
exports.open = open;
|
||||
|
||||
function onFocus(window) {
|
||||
|
||||
Reference in New Issue
Block a user