diff options
Diffstat (limited to 'dom/workers')
-rw-r--r-- | dom/workers/ScriptLoader.cpp | 20 | ||||
-rw-r--r-- | dom/workers/ServiceWorkerManager.cpp | 2 | ||||
-rw-r--r-- | dom/workers/ServiceWorkerScriptCache.cpp | 14 |
3 files changed, 18 insertions, 18 deletions
diff --git a/dom/workers/ScriptLoader.cpp b/dom/workers/ScriptLoader.cpp index 56b18441e..bcec94dcb 100644 --- a/dom/workers/ScriptLoader.cpp +++ b/dom/workers/ScriptLoader.cpp @@ -34,7 +34,6 @@ #include "nsIPipe.h" #include "nsIOutputStream.h" #include "nsPrintfCString.h" -#include "nsScriptLoader.h" #include "nsString.h" #include "nsStreamUtils.h" #include "nsTArray.h" @@ -58,6 +57,7 @@ #include "mozilla/dom/Promise.h" #include "mozilla/dom/PromiseNativeHandler.h" #include "mozilla/dom/Response.h" +#include "mozilla/dom/ScriptLoader.h" #include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/SRILogHelper.h" #include "mozilla/UniquePtr.h" @@ -1075,14 +1075,14 @@ private: // May be null. nsIDocument* parentDoc = mWorkerPrivate->GetDocument(); - // Use the regular nsScriptLoader for this grunt work! Should be just fine + // Use the regular ScriptLoader for this grunt work! Should be just fine // because we're running on the main thread. // Unlike <script> tags, Worker scripts are always decoded as UTF-8, // per spec. So we explicitly pass in the charset hint. - rv = nsScriptLoader::ConvertToUTF16(aLoadInfo.mChannel, aString, aStringLen, - NS_LITERAL_STRING("UTF-8"), parentDoc, - aLoadInfo.mScriptTextBuf, - aLoadInfo.mScriptTextLength); + rv = ScriptLoader::ConvertToUTF16(aLoadInfo.mChannel, aString, aStringLen, + NS_LITERAL_STRING("UTF-8"), parentDoc, + aLoadInfo.mScriptTextBuf, + aLoadInfo.mScriptTextLength); if (NS_FAILED(rv)) { return rv; } @@ -1289,10 +1289,10 @@ private: MOZ_ASSERT(!loadInfo.mScriptTextBuf); nsresult rv = - nsScriptLoader::ConvertToUTF16(nullptr, aString, aStringLen, - NS_LITERAL_STRING("UTF-8"), parentDoc, - loadInfo.mScriptTextBuf, - loadInfo.mScriptTextLength); + ScriptLoader::ConvertToUTF16(nullptr, aString, aStringLen, + NS_LITERAL_STRING("UTF-8"), parentDoc, + loadInfo.mScriptTextBuf, + loadInfo.mScriptTextLength); if (NS_SUCCEEDED(rv) && IsMainWorkerScript()) { nsCOMPtr<nsIURI> finalURI; rv = NS_NewURI(getter_AddRefs(finalURI), loadInfo.mFullURL, nullptr, nullptr); diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index a8f191f2e..306ef6b23 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -22,7 +22,6 @@ #include "nsITimer.h" #include "nsIUploadChannel2.h" #include "nsPIDOMWindow.h" -#include "nsScriptLoader.h" #include "nsServiceManagerUtils.h" #include "nsDebug.h" #include "nsISupportsPrimitives.h" @@ -44,6 +43,7 @@ #include "mozilla/dom/PromiseNativeHandler.h" #include "mozilla/dom/Request.h" #include "mozilla/dom/RootedDictionary.h" +#include "mozilla/dom/ScriptLoader.h" #include "mozilla/dom/TypedArray.h" #include "mozilla/ipc/BackgroundChild.h" #include "mozilla/ipc/PBackgroundChild.h" diff --git a/dom/workers/ServiceWorkerScriptCache.cpp b/dom/workers/ServiceWorkerScriptCache.cpp index f44bb673c..707b689e8 100644 --- a/dom/workers/ServiceWorkerScriptCache.cpp +++ b/dom/workers/ServiceWorkerScriptCache.cpp @@ -11,6 +11,7 @@ #include "mozilla/dom/cache/Cache.h" #include "mozilla/dom/Promise.h" #include "mozilla/dom/PromiseWorkerProxy.h" +#include "mozilla/dom/ScriptLoader.h" #include "mozilla/ipc/BackgroundUtils.h" #include "mozilla/ipc/PBackgroundSharedTypes.h" #include "nsICacheInfoChannel.h" @@ -23,7 +24,6 @@ #include "nsIScriptError.h" #include "nsContentUtils.h" #include "nsNetUtil.h" -#include "nsScriptLoader.h" #include "ServiceWorkerManager.h" #include "Workers.h" #include "nsStringStream.h" @@ -801,9 +801,9 @@ CompareNetwork::OnStreamComplete(nsIStreamLoader* aLoader, nsISupports* aContext char16_t* buffer = nullptr; size_t len = 0; - rv = nsScriptLoader::ConvertToUTF16(httpChannel, aString, aLen, - NS_LITERAL_STRING("UTF-8"), nullptr, - buffer, len); + rv = ScriptLoader::ConvertToUTF16(httpChannel, aString, aLen, + NS_LITERAL_STRING("UTF-8"), nullptr, + buffer, len); if (NS_WARN_IF(NS_FAILED(rv))) { mManager->NetworkFinished(rv); return rv; @@ -855,9 +855,9 @@ CompareCache::OnStreamComplete(nsIStreamLoader* aLoader, nsISupports* aContext, char16_t* buffer = nullptr; size_t len = 0; - nsresult rv = nsScriptLoader::ConvertToUTF16(nullptr, aString, aLen, - NS_LITERAL_STRING("UTF-8"), - nullptr, buffer, len); + nsresult rv = ScriptLoader::ConvertToUTF16(nullptr, aString, aLen, + NS_LITERAL_STRING("UTF-8"), + nullptr, buffer, len); if (NS_WARN_IF(NS_FAILED(rv))) { mManager->CacheFinished(rv, false); return rv; |