Nit: in Mozilla code such multi-line statements are conventionally formatted:

```
    let cacheService = Cc["@mozilla.org/network/application-cache-service;1"].
                       getService(Ci.nsIApplicationCacheService);
    cacheService.discardByAppId(localId, false);
```

But in this case it isn't useful to assign the result to a local variable since it's only ever used once, and this can be simply:

```
    Cc["@mozilla.org/network/application-cache-service;1"].
      getService(Ci.nsIApplicationCacheService).discardByAppId(localId, false);
```