I've written a Firefox addon for the first time and it was reviewed and accepted a few month ago. This add-on calls frequently a third-party API. Meanwhile it was reviewed again and now the way it calls setInterval is criticized:
setIntervalcalled in potentially dangerous manner. In order to prevent vulnerabilities, the setTimeout and setInterval functions should be called only with function expressions as their first argument. Variables referencing function names are acceptable but deprecated as they are not amenable to static source validation.
Here's some background about the »architecture« of my addon. It uses a global Object which is not much more than a namespace:
if ( 'undefined' == typeof myPlugin ) {
    var myPlugin = {
        //settings
        settings : {},
        intervalID : null,
        //called once on window.addEventlistener( 'load' )
        init : function() {
            //load settings
            //load remote data from cache (file)
        },
        //get the data from the API
        getRemoteData : function() {
            // XMLHttpRequest to the API
            // retreve data (application/json)
            // write it to a cache file
        }
    }
    //start 
    window.addEventListener(
    'load',
    function load( event ) {
        window.removeEventListener( 'load', load, false ); needed
        myPlugin.init();
    },
    false
);
}
So this may be not the best practice, but I keep on learning. The interval itself is called inside the init() method like so:
myPlugin.intervalID = window.setInterval(
    myPlugin.getRemoteData,
    myPlugin.settings.updateMinInterval * 1000 //milliseconds!
);
There's another point setting the interval: an observer to the settings (preferences) clears the current interval and set it exactly the same way like mentioned above when a change to the updateMinInterval setting occures.
As I get this right, a solution using »function expressions« should look like:
myPlugin.intervalID = window.setInterval(
    function() {
        myPlugin.getRemoteData();
    },
    myPlugin.settings.updateMinInterval * 1000 //milliseconds!
);
Am I right?
What is a possible scenario of »attacking« this code, I've overlooked so far?
Should setInterval and setTimeout basically used in another way in Firefox addons then in »normal« frontend javascripts? Because the documentation of setInterval exactly shows the way using declared functions in some examples. 
 
     
    