Initialize Intermediate Preloading in its own service

RESOLVED FIXED in Firefox 69

Status

()

enhancement
RESOLVED FIXED
5 months ago
Last month

People

(Reporter: jcj, Assigned: leplatrem)

Tracking

(Depends on 1 bug)

66 Branch
mozilla69
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox69 fixed)

Details

(Whiteboard: [psm-backlog])

Attachments

(2 attachments)

Bug 1404934 wired up Intermediate Preloading by initializing it in blocklist-clients.js, while it's not a blocklist.

It should be initialized (and maintained) someplace a little more clear for the long-haul.

See Also: → 1543598

You could move the initialization to BrowserGlue.jsm:

    Services.tm.idleDispatchToMainThread(() => {
      SecurityClients.initialize();
    });

But we better get Thunderbird folks in the loop since it does not have browserglue

See Also: → 1488865
Flags: needinfo?(jorgk)
Flags: needinfo?(jorgk)
Assignee: nobody → mathieu
Attachment #9065659 - Attachment description: Bug 1526018 - Initialize PSM client in their own service → Bug 1526018 - Initialize PSM clients in their own service
Attachment #9065659 - Attachment description: Bug 1526018 - Initialize PSM clients in their own service → Bug 1526018 - Initialize PSM client in their own service
Attachment #9065659 - Attachment description: Bug 1526018 - Initialize PSM client in their own service → Bug 1526018 - Initialize PSM clients in their own service
Pushed by mleplatre@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/134250706ea6
Initialize PSM clients in their own service r=Gijs,jcj

Jorg, I'm sending the patch to autoland.
How do we proceed to port the few lines to maiGlue.js? I guess I could do it, but I don't even have cloned TB...

Hi :-)
Well, I suggest you paste the lines here and tell me after which line they go using:
https://searchfox.org/comm-central/source/mail/components/mailGlue.js
I'll take care of the rest.

Would that work for you?

I didn't find exactly the same structure as in browserGlue, but I guess it's this (_onMailStartupDone())

--- mailGlue.js	2019-05-22 12:55:11.678982616 +0200
+++ mailGlue.js.orig	2019-05-22 12:48:51.174554255 +0200
@@ -14,7 +14,6 @@
 var {ExtensionSupport} = ChromeUtils.import("resource:///modules/ExtensionSupport.jsm");
 var { L10nRegistry, FileSource } = ChromeUtils.import("resource://gre/modules/L10nRegistry.jsm");
 var {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-var {RemoteSecuritySettings} = ChromeUtils.import("resource://gre/modules/psm/RemoteSecuritySettings.jsm");
 
 // lazy module getters
 
@@ -183,11 +182,6 @@
 
     const {ExtensionsUI} = ChromeUtils.import("resource:///modules/ExtensionsUI.jsm");
     ExtensionsUI.checkForSideloadedExtensions();
-
-    // Certificates revocation list, etc.
-    Services.tm.idleDispatchToMainThread(() => {
-      RemoteSecuritySettings.init();
-    });
   },
 
   _handleLink(aSubject, aData) {

In case you don't have Services.tm.idleDispatchToMainThread(), you can call .init() directly. It only instantiates cheap objects, and won't block startup. I just mimic what's done in browserGlue for other initializations :)

Thanks!

Thanks, Mathieu. I guess you meat to add the code rather than remove it ;-)

I'll see how this works once the M-C patch has landed, that is, if I need to pull out the Services.tm.idleDispatchToMainThread() call.

Thanks for your help.

Thanks, Mathieu. I guess you meat to add the code rather than remove it ;-)

Oh! I haven't even paid attention, I did the diff the other way :/

It looks good to me!

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/8d7c421d2c4a
Initialize PSM clients in their own service (C-C part). r-me

Thanks Mathieu, I checked with some debugging that this is really run.

Depends on: 1558640
You need to log in before you can comment on or make changes to this bug.