Closed Bug 1526018 Opened 6 years ago Closed 5 years ago

Initialize Intermediate Preloading in its own service

Categories

(Core :: Security Block-lists, Allow-lists, and other State, enhancement)

66 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: jcj, Assigned: leplatrem)

References

Details

(Whiteboard: [psm-backlog])

Attachments

(2 files, 1 obsolete file)

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.

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

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!

Attached patch 1526018-c-c-part.patch (deleted) β€” β€” Splinter Review

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: 5 years 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
Attached file Bug 1526018 - Initialize OneCRL when GeckoView starts. (obsolete) (deleted) β€”
No longer regressed by: CVE-2020-26957
Regressions: CVE-2020-26957

Comment on attachment 9181067 [details]
Bug 1526018 - Initialize OneCRL when GeckoView starts.

Revision D93250 was moved to bug 1667179. Setting attachment 9181067 [details] to obsolete.

Attachment #9181067 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: