Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

HTTPSRules.init gets called three times during Firefox startup #84

Closed
jsha opened this issue Jan 13, 2014 · 4 comments
Closed

HTTPSRules.init gets called three times during Firefox startup #84

jsha opened this issue Jan 13, 2014 · 4 comments

Comments

@jsha
Copy link
Member

jsha commented Jan 13, 2014

Once in the observer for profile-after-change, twice in the observer for nsPref:changed. Since this is an expensive call, we should find a way to make sure it only happens once during startup.

@diracdeltas
Copy link
Contributor

Working on a hack for this. I'm seeing that the HTTPSRules.init() call happens once for profile-after-change and twice for nsPref:changed.

@jsha
Copy link
Member Author

jsha commented Jan 13, 2014

Awesome. One other thing I noticed: The pref changed, in both cases, was security.mixed_content.block_active_content (I added this.log(WARN, "data " + data); to the callback). Makes me suspicious that something internal to HTTPS Everywhere is toggling the bit off and then on again, but I couldn't find anything doing that.

@jsha
Copy link
Member Author

jsha commented Jan 13, 2014

Ah, I don't know how I missed it at first but I think it's related to this specific watcher added in the HTTPSEverywhere constructor:

branch.addObserver("security.mixed_content.block_active_content",
this, false);

diracdeltas added a commit to diracdeltas/https-everywhere that referenced this issue Jan 20, 2014
@diracdeltas
Copy link
Contributor

Oops! Looks like pde fixed this in 554b4e1. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants