Closed Bug 1216939 Opened 9 years ago Closed 6 years ago

Don't import IndexedDBHelper.jsm and SettingsDB.jsm in preload.js

Categories

(Firefox OS Graveyard :: Performance, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: cyu, Assigned: cyu)

Details

Attachments

(1 file)

IndexedDB is used through IPC in content processes. There's no need to load IndexedDBHelper.jsm and SettingsDB.jsm in preload.js.
Oops! Accidentally marked as security-sensitive. Need help to make this bug public.
Paul, would you help uncheck the security-sensitive flag? Thanks :)
Flags: needinfo?(ptheriault)
Group: b2g-core-security
Flags: needinfo?(ptheriault)
Assignee: nobody → cyu
Attachment #8677950 - Flags: review?(fabrice)
SettingsDB.jsm is used by SettingsRequestManager.jsm which is then used by SettingsService.js
And this service can be used in child process unless I missed something, so we still benefit from preloading SettingsDB.jsm no?
(In reply to [:fabrice] Fabrice Desré from comment #5)
> SettingsDB.jsm is used by SettingsRequestManager.jsm which is then used by
> SettingsService.js
> And this service can be used in child process unless I missed something, so
> we still benefit from preloading SettingsDB.jsm no?

SettingsRequestManager states that it only lives in the parent process:
https://dxr.mozilla.org/mozilla-central/source/dom/settings/SettingsRequestManager.jsm#1219
so I don't think i has any benefit in loading it in child processes.
Hm, yes - but we still load it when using the SettingsService in child processes. Maybe we should not do that instead?
(In reply to [:fabrice] Fabrice Desré from comment #7)
> Hm, yes - but we still load it when using the SettingsService in child
> processes. Maybe we should not do that instead?

We shouldn't. I think we should also have a check in SettingsService that don't import SettingsRequestManager.jsm in the child process. The JSM is loaded only to throw an exception.
After checking SettingsServiceLock, I think it only resides in the parent process because it has direct calls to SettingsRequestManager.
Priority: -- → P2
Attachment #8677950 - Flags: review?(fabrice)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: