Bug 1450999 - always provide a null argument when opening a window for the -chrome command line parameter, otherwise the opened window is non-resizable, r=mconley.

This commit is contained in:
Florian Quèze 2018-04-09 16:23:50 +02:00
Родитель 2bf2ff691e
Коммит 1cb0e616bc
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -358,7 +358,12 @@ nsBrowserContentHandler.prototype = {
if (isLocal(resolvedURI)) {
// If the URI is local, we are sure it won't wrongly inherit chrome privs
let features = "chrome,dialog=no,all" + this.getFeatures(cmdLine);
Services.ww.openWindow(null, resolvedURI.spec, "_blank", features, null);
// Provide 1 null argument, as openWindow has a different behavior
// when the arg count is 0.
let argArray = Cc["@mozilla.org/array;1"]
.createInstance(Ci.nsIMutableArray);
argArray.appendElement(null);
Services.ww.openWindow(null, resolvedURI.spec, "_blank", features, argArray);
cmdLine.preventDefault = true;
} else {
dump("*** Preventing load of web URI as chrome\n");