Bug 1396693 - Make nsIEventListenerChange::changedListenerNames noscript. r=smaug.

This is required for deCOMtamination. The patch removes the only script use of
this attribute, which is a low-importance one in a test.

--HG--
extra : rebase_source : 65c29043fbd77e60b21398216593cc9788723dd5
This commit is contained in:
Nicholas Nethercote 2017-09-05 11:52:54 +10:00
parent 6376feec24
commit 712013de72
2 changed files with 1 additions and 16 deletions

View File

@ -17,7 +17,7 @@ interface nsIArray;
interface nsIEventListenerChange : nsISupports
{
readonly attribute nsIDOMEventTarget target;
readonly attribute nsIArray changedListenerNames;
[noscript] readonly attribute nsIArray changedListenerNames;
};
[scriptable, function, uuid(aa7c95f6-d3b5-44b3-9597-1d9f19b9c5f2)]

View File

@ -108,22 +108,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=524674
var expected = expectedEventChanges[i];
if (current.target == expected.target) {
// expected.target.listeners should be a subset of
// current.changedListenerNames if all expected listener changes were
// sent. We may get random other event listener changes here too, not
// just the one from the test.
is(current.target, expected.target, current.target + " = " + expected.target);
var eNames = current.changedListenerNames.enumerate();
var listeners = [];
while (eNames.hasMoreElements()) {
var listenerName = eNames.getNext().QueryInterface(Ci.nsIAtom).toString();
listeners.push(listenerName);
}
var matchAll = expected.listeners.every(function(val)
{ return listeners.indexOf(val) >= 0; });
if (!matchAll)
return;
++i;
}
} catch(ex) {