Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan

This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader
This commit is contained in:
Andrea Marchesini
2017-05-08 08:24:22 +02:00
parent 49df801e0d
commit 71aba8e0ee
53 changed files with 597 additions and 550 deletions

View File

@@ -15,7 +15,6 @@
#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "nsIFileURL.h"
#include "nsScriptLoader.h"
#include "nsIScriptSecurityManager.h"
#include "nsThreadUtils.h"
@@ -27,6 +26,7 @@
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/ScriptLoader.h"
#include "mozilla/HoldDropJSObjects.h"
#include "mozilla/ScriptPreloader.h"
#include "mozilla/scache/StartupCache.h"
@@ -148,8 +148,8 @@ PrepareScript(nsIURI* uri,
size_t scriptLength = 0;
nsresult rv =
nsScriptLoader::ConvertToUTF16(nullptr, reinterpret_cast<const uint8_t*>(buf), len,
charset, nullptr, scriptBuf, scriptLength);
ScriptLoader::ConvertToUTF16(nullptr, reinterpret_cast<const uint8_t*>(buf), len,
charset, nullptr, scriptBuf, scriptLength);
JS::SourceBufferHolder srcBuf(scriptBuf, scriptLength,
JS::SourceBufferHolder::GiveOwnership);
@@ -858,9 +858,9 @@ ScriptPrecompiler::OnStreamComplete(nsIIncrementalStreamLoader* aLoader,
// Convert data to char16_t* and prepare to call CompileOffThread.
nsAutoString hintCharset;
nsresult rv =
nsScriptLoader::ConvertToUTF16(mChannel, aString, aLength,
hintCharset, nullptr,
mScriptBuf, mScriptLength);
ScriptLoader::ConvertToUTF16(mChannel, aString, aLength,
hintCharset, nullptr,
mScriptBuf, mScriptLength);
NS_ENSURE_SUCCESS(rv, NS_OK);