summaryrefslogtreecommitdiffstats
path: root/dom/workers/ScriptLoader.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-06-30 11:32:07 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-10 18:28:50 +0000
commit0633844f46858135ee62d396829c6292492ca117 (patch)
tree051f8c4a50ab5c955f5d4e70e4de0ea50151758e /dom/workers/ScriptLoader.cpp
parentd0126b96cd6527e6dc89530b333fb0c196aba30d (diff)
downloadUXP-0633844f46858135ee62d396829c6292492ca117.tar
UXP-0633844f46858135ee62d396829c6292492ca117.tar.gz
UXP-0633844f46858135ee62d396829c6292492ca117.tar.lz
UXP-0633844f46858135ee62d396829c6292492ca117.tar.xz
UXP-0633844f46858135ee62d396829c6292492ca117.zip
Issue #1603 - Part 1: Reorganize ScriptLoader/ScriptElement
- Moves scripting parts of DOM into 'dom/script' - Renames nsScript{Loader/Element} to Script{Loader/Element} - Adjusts all callers
Diffstat (limited to 'dom/workers/ScriptLoader.cpp')
-rw-r--r--dom/workers/ScriptLoader.cpp20
1 files changed, 10 insertions, 10 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);