diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /xpcom/components/StaticComponents.cpp.in | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xpcom/components/StaticComponents.cpp.in')
-rw-r--r-- | xpcom/components/StaticComponents.cpp.in | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xpcom/components/StaticComponents.cpp.in b/xpcom/components/StaticComponents.cpp.in index 7f3fee6859..d717b9f64a 100644 --- a/xpcom/components/StaticComponents.cpp.in +++ b/xpcom/components/StaticComponents.cpp.in @@ -83,9 +83,14 @@ const nsXPTInterface gInterfaces[] = { //# @interfaces@ }; +//# @define_has_component_jsms@ + +#ifdef HAS_COMPONENT_JSMS +// TODO: Remove this once m-c and c-c migrations finish (bug 1881887). const StringOffset gComponentJSMs[] = { //# @component_jsms@ }; +#endif const StringOffset gComponentESModules[] = { //# @component_esmodules@ @@ -148,9 +153,9 @@ static nsresult ConstructJSMOrESMComponent(const nsACString& aURI, (void**)aResult); } -static nsresult ConstructJSMComponent(const nsACString& aURI, - const char* aConstructor, - nsISupports** aResult) { +[[maybe_unused]] static nsresult ConstructJSMComponent(const nsACString& aURI, + const char* aConstructor, + nsISupports** aResult) { return ConstructJSMOrESMComponent<ComponentType::JSM>( aURI, aConstructor, aResult); } @@ -351,11 +356,15 @@ const StaticProtocolHandler* StaticProtocolHandler::Lookup(const nsACString& aSc /* static */ already_AddRefed<nsIUTF8StringEnumerator> StaticComponents::GetComponentJSMs() { +#ifdef HAS_COMPONENT_JSMS auto jsms = MakeUnique<nsTArray<nsCString>>(MOZ_ARRAY_LENGTH(gComponentJSMs)); for (const auto& entry : gComponentJSMs) { jsms->AppendElement(GetString(entry)); } +#else + auto jsms = MakeUnique<nsTArray<nsCString>>(0); +#endif nsCOMPtr<nsIUTF8StringEnumerator> result; MOZ_ALWAYS_SUCCEEDS(NS_NewAdoptingUTF8StringEnumerator(getter_AddRefs(result), |