Skip to content

Commit

Permalink
Backed out changeset e1f191aad863 (bug 1356569)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archaeopteryx committed Apr 14, 2017
1 parent 738d097 commit 9e0ecf3
Show file tree
Hide file tree
Showing 39 changed files with 92 additions and 87 deletions.
20 changes: 10 additions & 10 deletions browser/base/content/utilityOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,15 @@ function openLinkIn(url, where, params) {
createInstance(Ci.nsISupportsPRUint32);
userContextIdSupports.data = aUserContextId;

sa.appendElement(wuri);
sa.appendElement(charset);
sa.appendElement(referrerURISupports);
sa.appendElement(aPostData);
sa.appendElement(allowThirdPartyFixupSupports);
sa.appendElement(referrerPolicySupports);
sa.appendElement(userContextIdSupports);
sa.appendElement(aPrincipal);
sa.appendElement(aTriggeringPrincipal);
sa.appendElement(wuri, /* weak =*/ false);
sa.appendElement(charset, /* weak =*/ false);
sa.appendElement(referrerURISupports, /* weak =*/ false);
sa.appendElement(aPostData, /* weak =*/ false);
sa.appendElement(allowThirdPartyFixupSupports, /* weak =*/ false);
sa.appendElement(referrerPolicySupports, /* weak =*/ false);
sa.appendElement(userContextIdSupports, /* weak =*/ false);
sa.appendElement(aPrincipal, /* weak =*/ false);
sa.appendElement(aTriggeringPrincipal, /* weak =*/ false);

let features = "chrome,dialog=no,all";
if (aIsPrivate) {
Expand Down Expand Up @@ -747,7 +747,7 @@ function openPreferences(paneID, extraArgs) {
let supportsStringPrefURL = Cc["@mozilla.org/supports-string;1"]
.createInstance(Ci.nsISupportsString);
supportsStringPrefURL.data = preferencesURL;
windowArguments.appendElement(supportsStringPrefURL);
windowArguments.appendElement(supportsStringPrefURL, /* weak =*/ false);

win = Services.ww.openWindow(null, Services.prefs.getCharPref("browser.chromeURL"),
"_blank", "chrome,dialog=no,all", windowArguments);
Expand Down
10 changes: 5 additions & 5 deletions browser/components/extensions/ext-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ this.windows = class extends ExtensionAPI {
}
createData.incognito = incognito;

args.appendElement(tab);
args.appendElement(tab, /* weak = */ false);
} else if (createData.url !== null) {
if (Array.isArray(createData.url)) {
let array = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
for (let url of createData.url) {
array.appendElement(mkstr(url));
array.appendElement(mkstr(url), /* weak = */ false);
}
args.appendElement(array);
args.appendElement(array, /* weak = */ false);
} else {
args.appendElement(mkstr(createData.url));
args.appendElement(mkstr(createData.url), /* weak = */ false);
}
} else {
args.appendElement(mkstr(aboutNewTabService.newTabURL));
args.appendElement(mkstr(aboutNewTabService.newTabURL), /* weak = */ false);
}

let features = ["chrome"];
Expand Down
2 changes: 1 addition & 1 deletion browser/components/feeds/WebContentConverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ WebContentConverterRegistrar.prototype = {
let eps = Cc["@mozilla.org/uriloader/external-protocol-service;1"].
getService(Ci.nsIExternalProtocolService);
let handlerInfo = eps.getProtocolHandlerInfo(protocol);
handlerInfo.possibleApplicationHandlers.appendElement(handler);
handlerInfo.possibleApplicationHandlers.appendElement(handler, false);

// Since the user has agreed to add a new handler, chances are good
// that the next time they see a handler of this type, they're going
Expand Down
2 changes: 1 addition & 1 deletion browser/components/migration/MigrationUtils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ this.MigrationUtils = Object.freeze({
throw new Error("Unexpected parameter type " + (typeof item) + ": " + item);
}
}
params.appendElement(comtaminatedVal);
params.appendElement(comtaminatedVal, false);
}
} else {
params = aParams;
Expand Down
24 changes: 12 additions & 12 deletions browser/components/nsBrowserContentHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,20 +197,20 @@ function openWindow(parent, url, target, features, args, noExternalArgs) {
var sstring = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(nsISupportsString);
sstring.data = uri;
uriArray.appendElement(sstring);
uriArray.appendElement(sstring, /* weak = */ false);
});
argArray.appendElement(uriArray);
argArray.appendElement(uriArray, /* weak =*/ false);
} else {
argArray.appendElement(null);
argArray.appendElement(null, /* weak =*/ false);
}

// Pass these as null to ensure that we always trigger the "single URL"
// behavior in browser.js's gBrowserInit.onLoad (which handles the window
// arguments)
argArray.appendElement(null); // charset
argArray.appendElement(null); // referer
argArray.appendElement(null); // postData
argArray.appendElement(null); // allowThirdPartyFixup
argArray.appendElement(null, /* weak =*/ false); // charset
argArray.appendElement(null, /* weak =*/ false); // referer
argArray.appendElement(null, /* weak =*/ false); // postData
argArray.appendElement(null, /* weak =*/ false); // allowThirdPartyFixup

return Services.ww.openWindow(parent, url, target, features, argArray);
}
Expand All @@ -223,7 +223,7 @@ function openPreferences() {
.createInstance(Components.interfaces.nsISupportsString);
wuri.data = "about:preferences";

args.appendElement(wuri);
args.appendElement(wuri, /* weak = */ false);

Services.ww.openWindow(null, gBrowserContentHandler.chromeURL,
"_blank",
Expand Down Expand Up @@ -251,10 +251,10 @@ function doSearch(searchTerm, cmdLine) {
.createInstance(Components.interfaces.nsISupportsString);
wuri.data = submission.uri.spec;

args.appendElement(wuri);
args.appendElement(null);
args.appendElement(null);
args.appendElement(submission.postData);
args.appendElement(wuri, /* weak =*/ false);
args.appendElement(null, /* weak =*/ false);
args.appendElement(null, /* weak =*/ false);
args.appendElement(submission.postData, /* weak =*/ false);

// XXXbsmedberg: use handURIToExistingBrowser to obey tabbed-browsing
// preferences, but need nsIBrowserDOMWindow extensions
Expand Down
2 changes: 1 addition & 1 deletion browser/components/places/PlacesUIUtils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ this.PlacesUIUtils = {
var uriList = PlacesUtils.toISupportsString(urls.join("|"));
var args = Cc["@mozilla.org/array;1"].
createInstance(Ci.nsIMutableArray);
args.appendElement(uriList);
args.appendElement(uriList, /* weak =*/ false);
browserWindow = Services.ww.openWindow(aWindow,
"chrome://browser/content/browser.xul",
null, "chrome,dialog=no,all", args);
Expand Down
6 changes: 3 additions & 3 deletions browser/components/preferences/in-content-old/applications.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ HandlerInfoWrapper.prototype = {
if (possibleApps.getNext().equals(aNewHandler))
return;
}
this.possibleApplicationHandlers.appendElement(aNewHandler);
this.possibleApplicationHandlers.appendElement(aNewHandler, false);
},

removePossibleApplicationHandler(aHandler) {
Expand Down Expand Up @@ -572,13 +572,13 @@ FeedHandlerInfo.prototype = {
let preferredApp = getLocalHandlerApp(preferredAppFile);
let defaultApp = this._defaultApplicationHandler;
if (!defaultApp || !defaultApp.equals(preferredApp))
this._possibleApplicationHandlers.appendElement(preferredApp);
this._possibleApplicationHandlers.appendElement(preferredApp, false);
}

// Add the registered web handlers. There can be any number of these.
var webHandlers = this._converterSvc.getContentHandlers(this.type);
for (let webHandler of webHandlers)
this._possibleApplicationHandlers.appendElement(webHandler);
this._possibleApplicationHandlers.appendElement(webHandler, false);

return this._possibleApplicationHandlers;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function test() {
var extps = Cc["@mozilla.org/uriloader/external-protocol-service;1"].
getService(Ci.nsIExternalProtocolService);
var info = extps.getProtocolHandlerInfo("apppanetest");
info.possibleApplicationHandlers.appendElement(handler);
info.possibleApplicationHandlers.appendElement(handler, false);

var hserv = Cc["@mozilla.org/uriloader/handler-service;1"].
getService(Ci.nsIHandlerService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function setupFakeHandler() {
let handler = info.possibleLocalHandlers.queryElementAt(0, Ci.nsILocalHandlerApp);

let infoToModify = gMimeSvc.getFromTypeAndExtension("text/x-test-handler", null);
infoToModify.possibleApplicationHandlers.appendElement(handler);
infoToModify.possibleApplicationHandlers.appendElement(handler, false);

gHandlerSvc.store(infoToModify);
}
Expand Down
6 changes: 3 additions & 3 deletions browser/components/preferences/in-content/applications.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ HandlerInfoWrapper.prototype = {
if (possibleApps.getNext().equals(aNewHandler))
return;
}
this.possibleApplicationHandlers.appendElement(aNewHandler);
this.possibleApplicationHandlers.appendElement(aNewHandler, false);
},

removePossibleApplicationHandler(aHandler) {
Expand Down Expand Up @@ -574,13 +574,13 @@ FeedHandlerInfo.prototype = {
let preferredApp = getLocalHandlerApp(preferredAppFile);
let defaultApp = this._defaultApplicationHandler;
if (!defaultApp || !defaultApp.equals(preferredApp))
this._possibleApplicationHandlers.appendElement(preferredApp);
this._possibleApplicationHandlers.appendElement(preferredApp, false);
}

// Add the registered web handlers. There can be any number of these.
var webHandlers = this._converterSvc.getContentHandlers(this.type);
for (let webHandler of webHandlers)
this._possibleApplicationHandlers.appendElement(webHandler);
this._possibleApplicationHandlers.appendElement(webHandler, false);

return this._possibleApplicationHandlers;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function test() {
var extps = Cc["@mozilla.org/uriloader/external-protocol-service;1"].
getService(Ci.nsIExternalProtocolService);
var info = extps.getProtocolHandlerInfo("apppanetest");
info.possibleApplicationHandlers.appendElement(handler);
info.possibleApplicationHandlers.appendElement(handler, false);

var hserv = Cc["@mozilla.org/uriloader/handler-service;1"].
getService(Ci.nsIHandlerService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function setupFakeHandler() {
let handler = info.possibleLocalHandlers.queryElementAt(0, Ci.nsILocalHandlerApp);

let infoToModify = gMimeSvc.getFromTypeAndExtension("text/x-test-handler", null);
infoToModify.possibleApplicationHandlers.appendElement(handler);
infoToModify.possibleApplicationHandlers.appendElement(handler, false);

gHandlerSvc.store(infoToModify);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ MockContentPermissionType.prototype = {
function MockContentPermissionRequest(typesArray) {
this.types = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
for (let type of typesArray) {
this.types.appendElement(type);
this.types.appendElement(type, false);
}
}

Expand Down
2 changes: 1 addition & 1 deletion browser/modules/ContentWebRTC.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ this.ContentWebRTC = {
let allowedDevices = Cc["@mozilla.org/array;1"]
.createInstance(Ci.nsIMutableArray);
for (let deviceIndex of aMessage.data.devices)
allowedDevices.appendElement(devices[deviceIndex]);
allowedDevices.appendElement(devices[deviceIndex], /* weak =*/ false);

Services.obs.notifyObservers(allowedDevices, "getUserMedia:response:allow", callID);
break;
Expand Down
6 changes: 3 additions & 3 deletions browser/modules/WindowsJumpLists.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ this.WinTaskbarJumpList =
return;
var item = this._getHandlerAppItem(task.title, task.description,
task.args, task.iconIndex, null);
items.appendElement(item);
items.appendElement(item, false);
}, this);

if (items.length > 0)
Expand Down Expand Up @@ -324,7 +324,7 @@ this.WinTaskbarJumpList =
let faviconPageUri = Services.io.newURI(aResult.uri);
let shortcut = this._getHandlerAppItem(title, title, aResult.uri, 1,
faviconPageUri);
items.appendElement(shortcut);
items.appendElement(shortcut, false);
this._frequentHashList.push(aResult.uri);
},
this
Expand Down Expand Up @@ -369,7 +369,7 @@ this.WinTaskbarJumpList =
let faviconPageUri = Services.io.newURI(aResult.uri);
let shortcut = this._getHandlerAppItem(title, title, aResult.uri, 1,
faviconPageUri);
items.appendElement(shortcut);
items.appendElement(shortcut, false);
count++;
},
this
Expand Down
2 changes: 1 addition & 1 deletion dom/presentation/provider/PresentationControlService.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ function ChannelDescription(aInit) {
let wrapper = Cc["@mozilla.org/supports-cstring;1"]
.createInstance(Ci.nsISupportsCString);
wrapper.data = address;
this._tcpAddresses.appendElement(wrapper);
this._tcpAddresses.appendElement(wrapper, false);
}

this._tcpPort = aInit.tcpPort;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const address = Cc["@mozilla.org/supports-cstring;1"]
.createInstance(Ci.nsISupportsCString);
address.data = "127.0.0.1";
const addresses = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
addresses.appendElement(address);
addresses.appendElement(address, false);

const mockedChannelDescription = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationChannelDescription]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function filterDevice() {
let presentationUrls = Cc['@mozilla.org/array;1'].createInstance(Ci.nsIMutableArray);
let url = Cc['@mozilla.org/supports-string;1'].createInstance(Ci.nsISupportsString);
url.data = forbiddenRequestedUrl;
presentationUrls.appendElement(url);
presentationUrls.appendElement(url, false);
let devices = manager.getAvailableDevices(presentationUrls);
Assert.equal(devices.length, 0, 'expect 0 available device for example.com');
run_next_test();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const address = Cc["@mozilla.org/supports-cstring;1"]
.createInstance(Ci.nsISupportsCString);
address.data = "127.0.0.1";
const addresses = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
addresses.appendElement(address);
addresses.appendElement(address, false);

const serverChannelDescription = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationChannelDescription]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function TestDescription(aType, aTcpAddress, aTcpPort) {
let wrapper = Cc["@mozilla.org/supports-cstring;1"]
.createInstance(Ci.nsISupportsCString);
wrapper.data = address;
this.tcpAddress.appendElement(wrapper);
this.tcpAddress.appendElement(wrapper, false);
}
this.tcpPort = aTcpPort;
}
Expand Down
2 changes: 1 addition & 1 deletion dom/push/Push.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Push.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionType]),
};
let typeArray = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
typeArray.appendElement(type);
typeArray.appendElement(type, false);

// create a nsIContentPermissionRequest
let request = {
Expand Down
4 changes: 2 additions & 2 deletions mobile/android/chrome/content/WebrtcUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ var WebrtcUI = {
if (inputs && inputs.audioDevice != undefined)
audioId = inputs.audioDevice;
if (audioDevices[audioId])
allowedDevices.appendElement(audioDevices[audioId]);
allowedDevices.appendElement(audioDevices[audioId], /*weak =*/ false);

let videoId = 0;
if (inputs && inputs.videoSource != undefined)
videoId = inputs.videoSource;
if (videoDevices[videoId]) {
allowedDevices.appendElement(videoDevices[videoId]);
allowedDevices.appendElement(videoDevices[videoId], /*weak =*/ false);
let perms = Services.perms;
// Although the lifetime is "session" it will be removed upon
// use so it's more of a one-shot.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function TestDescription(aType, aTcpAddress, aTcpPort) {
let wrapper = Cc["@mozilla.org/supports-cstring;1"]
.createInstance(Ci.nsISupportsCString);
wrapper.data = address;
this.tcpAddress.appendElement(wrapper);
this.tcpAddress.appendElement(wrapper, false);
}
this.tcpPort = aTcpPort;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var cert;
*/
function openClientAuthDialog(cert) {
let certList = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
certList.appendElement(cert);
certList.appendElement(cert, false);

let returnVals = Cc["@mozilla.org/hash-property-bag;1"]
.createInstance(Ci.nsIWritablePropertyBag2);
Expand Down
9 changes: 6 additions & 3 deletions toolkit/components/downloads/test/unit/test_app_rep.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,12 @@ add_test(function test_redirect_on_blocklist() {
let secman = Services.scriptSecurityManager;
let badRedirects = Cc["@mozilla.org/array;1"]
.createInstance(Ci.nsIMutableArray);
badRedirects.appendElement(secman.createCodebasePrincipal(exampleURI, {}));
badRedirects.appendElement(secman.createCodebasePrincipal(blocklistedURI, {}));
badRedirects.appendElement(secman.createCodebasePrincipal(whitelistedURI, {}));
badRedirects.appendElement(secman.createCodebasePrincipal(exampleURI, {}),
false);
badRedirects.appendElement(secman.createCodebasePrincipal(blocklistedURI, {}),
false);
badRedirects.appendElement(secman.createCodebasePrincipal(whitelistedURI, {}),
false);
gAppRep.queryReputation({
sourceURI: whitelistedURI,
referrerURI: exampleURI,
Expand Down
2 changes: 1 addition & 1 deletion toolkit/components/extensions/ext-c-identity.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function openOAuthWindow(details, redirectURI) {
let supportsStringPrefURL = Cc["@mozilla.org/supports-string;1"]
.createInstance(Ci.nsISupportsString);
supportsStringPrefURL.data = details.url;
args.appendElement(supportsStringPrefURL);
args.appendElement(supportsStringPrefURL, /* weak =*/ false);

let window = Services.ww.openWindow(null,
Services.prefs.getCharPref("browser.chromeURL"),
Expand Down
2 changes: 1 addition & 1 deletion toolkit/components/extensions/ext-protocolHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ this.protocolHandlers = class extends ExtensionAPI {
handler.uriTemplate = handlerConfig.uriTemplate;

let protoInfo = protocolService.getProtocolHandlerInfo(handlerConfig.protocol);
protoInfo.possibleApplicationHandlers.appendElement(handler);
protoInfo.possibleApplicationHandlers.appendElement(handler, false);
handlerService.store(protoInfo);
}
}
Expand Down
Loading

0 comments on commit 9e0ecf3

Please sign in to comment.