Add keyed histogram for add-on shim usage

RESOLVED FIXED in Firefox 40

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: billm, Assigned: billm)

Tracking

34 Branch
Firefox 40
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(1 attachment)

Created attachment 8587755 [details] [diff] [review]
patch

I'd like to start collecting data on which add-ons are using the shims. Since we also know which add-ons are installed, we can find out which add-ons are *not* using the shims. Then we can consider turning the shims off for these add-ons automatically.

Gabor, this just adds a numeric code for each kind of shim. I also had to pass in the add-on ID to CompatWarnings.warn.

I removed frameScriptSections because I think we'll probably implement those checks in different ways.
Attachment #8587755 - Flags: review?(gkrizsanits)
Comment on attachment 8587755 [details] [diff] [review]
patch

Review of attachment 8587755 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/addoncompat/CompatWarning.jsm
@@ +17,5 @@
>  
> +function section(number, url)
> +{
> +  const baseURL = "https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Limitations_of_chrome_scripts";
> +  return {number, url: baseURL + url};

Nit: { number, url: baseURL + url };

@@ +63,5 @@
>      Services.console.logMessage(error);
>    },
>  
> +  warnings: {
> +    content: section(0, "#gBrowser.contentWindow.2C_window.content..."),

Maybe we should reserve 0 for the case when warning is undefined... not very useful for now, so I'm not forcing it, just an idea.

Oh, and thanks for removing frameScriptSections, I was going to do that as well.
Attachment #8587755 - Flags: review?(gkrizsanits) → review+
https://hg.mozilla.org/mozilla-central/rev/ee6fe10484d2
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
You need to log in before you can comment on or make changes to this bug.