Fix plugin scope not loaded if plugin is disabled when starting Zotero (#5129)
This commit is contained in:
parent
d92ddd18b7
commit
ccf4fd20cc
1 changed files with 4 additions and 0 deletions
|
@ -122,6 +122,9 @@ Zotero.Plugins = new function () {
|
|||
* https://searchfox.org/mozilla-esr60/source/toolkit/mozapps/extensions/internal/XPIProvider.jsm#4233
|
||||
*/
|
||||
function _loadScope(addon) {
|
||||
if (scopes.has(addon.id)) {
|
||||
return;
|
||||
}
|
||||
var scope = new Cu.Sandbox(
|
||||
Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
{
|
||||
|
@ -662,6 +665,7 @@ Zotero.Plugins = new function () {
|
|||
return;
|
||||
}
|
||||
Zotero.debug("Enabling plugin " + addon.id);
|
||||
_loadScope(addon);
|
||||
setDefaultPrefs(addon);
|
||||
await registerLocales(addon);
|
||||
await _callMethod(addon, 'startup', REASONS.ADDON_ENABLE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue