зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1173523 - Part 13: Update SpecialPowers to use new API for nsIPermission, r=jmaher
This commit is contained in:
Родитель
5588333939
Коммит
a214a150be
|
@ -217,7 +217,16 @@ SpecialPowersObserver.prototype = new SpecialPowersObserverAPI();
|
|||
switch (aTopic) {
|
||||
case "perm-changed":
|
||||
var permission = aSubject.QueryInterface(Ci.nsIPermission);
|
||||
msg.permission = { appId: permission.appId, type: permission.type };
|
||||
|
||||
// specialPowersAPI will consume this value, and it is used as a
|
||||
// fake permission, but only type and principal.appId will be used.
|
||||
//
|
||||
// We need to ensure that it looks the same as a real permission,
|
||||
// so we fake these properties.
|
||||
msg.permission = {
|
||||
principal: { appId: permission.principal.appId },
|
||||
type: permission.type
|
||||
};
|
||||
default:
|
||||
this._self._sendAsyncMessage("specialpowers-" + aTopic, msg);
|
||||
}
|
||||
|
|
|
@ -967,7 +967,7 @@ SpecialPowersAPI.prototype = {
|
|||
for (var j = 0; j < undos.length; j++) {
|
||||
var undo = undos[j];
|
||||
if (undo.op == this._obsDataMap[aData] &&
|
||||
undo.appId == permission.appId &&
|
||||
undo.appId == permission.principal.appId &&
|
||||
undo.type == permission.type) {
|
||||
// Remove this undo item if it has been done by others(not
|
||||
// specialpowers itself.)
|
||||
|
|
Загрузка…
Ссылка в новой задаче