Closed Bug 1455458 Opened 6 years ago Closed 6 years ago

De-IDLify JS access to blocklist service

Categories

(Toolkit :: Add-ons Manager, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

Details

Attachments

(1 file)

There's no reason for the JS-only side of the blocklist service to go through XPConnect. It just slows things down and makes maintenance harder.
Comment on attachment 8969489 [details]
Bug 1455458: De-XPIDLify the blocklist service.

https://reviewboard.mozilla.org/r/238238/#review244132

::: toolkit/mozapps/extensions/nsBlocklistService.js:1505
(Diff revision 1)
>    QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
>                                           Ci.nsIBlocklistService,
>                                           Ci.nsITimerCallback]),
>  };
>  
> -/**
> +/*

Out of interest, why de-jsdoc this?

::: tools/lint/eslint/eslint-plugin-mozilla/lib/rules/use-services.js:49
(Diff revision 1)
> +        if (property.value.elements.length > 1) {
> -        interfaces[property.key.name] = property.value.elements[1].value;
> +          interfaces[property.key.name] = property.value.elements[1].value;
> -      }
> +        }
> +      }

Can you add nsIBlocklistService to the list at the top of this file, given that we now won't detect people trying to use it in JS?
Attachment #8969489 - Flags: review?(gijskruitbosch+bugs) → review+
Comment on attachment 8969489 [details]
Bug 1455458: De-XPIDLify the blocklist service.

https://reviewboard.mozilla.org/r/238238/#review244132

> Out of interest, why de-jsdoc this?

It failed the valid-jsdoc rule because it doesn't document the parameters or return value. Ideally, those should be documented, but we don't really lose anything by making this a non-jsdoc comment, and we gain a lot by turning on the valid-jsdoc rule and fixing the rest of the docs, so *shrug*.
https://hg.mozilla.org/mozilla-central/rev/6ef55ab924d4
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Is manual testing required on this bug? If Yes, please provide some STR and the proper webextension(if required), if No set the “qe-verify-“ flag.
Flags: needinfo?(kmaglione+bmo)
Flags: needinfo?(kmaglione+bmo) → qe-verify-
Depends on: 1458215
You need to log in before you can comment on or make changes to this bug.