diff options
author | JustOff <Off.Just.Off@gmail.com> | 2017-11-17 19:04:38 +0200 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2017-11-17 19:04:38 +0200 |
commit | 5952adeef93575381edf53fa306b4ac18ecb761d (patch) | |
tree | a01213b1b7888aa4599fa2a8cf628c2f7c4bbc11 /dom | |
parent | 56b2a7318afc34063fc7b26134d981b85cd05bed (diff) | |
download | palemoon-gre-5952adeef93575381edf53fa306b4ac18ecb761d.tar.gz |
Change nsIDocumentLoaderFactory and nsIURIContentListener to take MIME types as an XPCOM string, not a char*
Diffstat (limited to 'dom')
-rw-r--r-- | dom/base/nsContentUtils.cpp | 8 | ||||
-rw-r--r-- | dom/base/nsContentUtils.h | 2 | ||||
-rw-r--r-- | dom/base/nsDocument.cpp | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 0c6569c7e..81427bdde 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -6463,7 +6463,7 @@ nsContentUtils::AllowXULXBLForPrincipal(nsIPrincipal* aPrincipal) } already_AddRefed<nsIDocumentLoaderFactory> -nsContentUtils::FindInternalContentViewer(const char* aType, +nsContentUtils::FindInternalContentViewer(const nsACString& aType, ContentViewerType* aLoaderType) { if (aLoaderType) { @@ -6478,7 +6478,9 @@ nsContentUtils::FindInternalContentViewer(const char* aType, nsCOMPtr<nsIDocumentLoaderFactory> docFactory; nsXPIDLCString contractID; - nsresult rv = catMan->GetCategoryEntry("Goanna-Content-Viewers", aType, getter_Copies(contractID)); + nsresult rv = catMan->GetCategoryEntry("Goanna-Content-Viewers", + PromiseFlatCString(aType).get(), + getter_Copies(contractID)); if (NS_SUCCEEDED(rv)) { docFactory = do_GetService(contractID); if (docFactory && aLoaderType) { @@ -6492,7 +6494,7 @@ nsContentUtils::FindInternalContentViewer(const char* aType, return docFactory.forget(); } - if (DecoderTraits::IsSupportedInVideoDocument(nsDependentCString(aType))) { + if (DecoderTraits::IsSupportedInVideoDocument(aType)) { docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1"); if (docFactory && aLoaderType) { *aLoaderType = TYPE_CONTENT; diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index a68269d37..2cd433b10 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -2065,7 +2065,7 @@ public: }; static already_AddRefed<nsIDocumentLoaderFactory> - FindInternalContentViewer(const char* aType, + FindInternalContentViewer(const nsACString& aType, ContentViewerType* aLoaderType = nullptr); /** diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 0683423ff..f2c839fe9 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -1227,7 +1227,7 @@ nsExternalResourceMap::PendingLoad::SetupViewer(nsIRequest* aRequest, nsCOMPtr<nsIContentViewer> viewer; nsCOMPtr<nsIStreamListener> listener; rv = docLoaderFactory->CreateInstance("external-resource", chan, newLoadGroup, - type.get(), nullptr, nullptr, + type, nullptr, nullptr, getter_AddRefs(listener), getter_AddRefs(viewer)); NS_ENSURE_SUCCESS(rv, rv); |