same problem here as in [bug 833171](https://bugzilla.mozilla.org/show_bug.cgi?id=833171), this will be fine:

    function listener(event) {
      console.log("last private window closed"); 
    }
    events.on("last-pb-context-exited", listener);

because there will be a reference to `listener`.