mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1656307 - Clean up some do_ImportModule calls with new overload, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D85449
This commit is contained in:
parent
94ef7ca811
commit
f60ca8ca4d
@ -84,11 +84,8 @@ bool Localization::Init() {
|
||||
}
|
||||
|
||||
void Localization::Activate(const bool aEager) {
|
||||
nsCOMPtr<mozILocalizationJSM> jsm =
|
||||
do_ImportModule("resource://gre/modules/Localization.jsm");
|
||||
MOZ_RELEASE_ASSERT(jsm);
|
||||
|
||||
Unused << jsm->GetLocalization(getter_AddRefs(mLocalization));
|
||||
mLocalization = do_ImportModule("resource://gre/modules/Localization.jsm",
|
||||
"Localization");
|
||||
MOZ_RELEASE_ASSERT(mLocalization);
|
||||
|
||||
AutoJSContext cx;
|
||||
|
@ -39,9 +39,3 @@ interface mozILocalization : nsISupports
|
||||
Array<AUTF8String> formatValuesSync(in Array<AString> aResourceIds, in jsval aBundles, in Array<jsval> aKeys);
|
||||
Array<jsval> formatMessagesSync(in Array<AString> aResourceIds, in jsval aBundles, in Array<jsval> aKeys);
|
||||
};
|
||||
|
||||
[scriptable, uuid(96632d26-1422-12e9-b1ce-9bb586acd241)]
|
||||
interface mozILocalizationJSM : nsISupports
|
||||
{
|
||||
readonly attribute mozILocalization Localization;
|
||||
};
|
||||
|
@ -66,11 +66,9 @@ static mozIExtensionProcessScript& ProcessScript() {
|
||||
static nsCOMPtr<mozIExtensionProcessScript> sProcessScript;
|
||||
|
||||
if (MOZ_UNLIKELY(!sProcessScript)) {
|
||||
nsCOMPtr<mozIExtensionProcessScriptJSM> jsm =
|
||||
do_ImportModule("resource://gre/modules/ExtensionProcessScript.jsm");
|
||||
MOZ_RELEASE_ASSERT(jsm);
|
||||
|
||||
Unused << jsm->GetExtensionProcessScript(getter_AddRefs(sProcessScript));
|
||||
sProcessScript =
|
||||
do_ImportModule("resource://gre/modules/ExtensionProcessScript.jsm",
|
||||
"ExtensionProcessScript");
|
||||
MOZ_RELEASE_ASSERT(sProcessScript);
|
||||
ClearOnShutdown(&sProcessScript);
|
||||
}
|
||||
|
@ -19,9 +19,3 @@ interface mozIExtensionProcessScript : nsISupports
|
||||
void initExtensionDocument(in nsISupports extension, in Document doc,
|
||||
in bool privileged);
|
||||
};
|
||||
|
||||
[scriptable, uuid(9f2a6434-f0ef-4063-ae33-368d929805d2)]
|
||||
interface mozIExtensionProcessScriptJSM : nsISupports
|
||||
{
|
||||
readonly attribute mozIExtensionProcessScript ExtensionProcessScript;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user