mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 931249 - Patch 1.1 - Set baseURI when script is obtained from cache. r=khuey
This commit is contained in:
parent
1b4eb261a9
commit
ad93de8c47
@ -973,6 +973,7 @@ private:
|
||||
DataReceivedFromCache(uint32_t aIndex, const uint8_t* aString,
|
||||
uint32_t aStringLen)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
MOZ_ASSERT(aIndex < mLoadInfos.Length());
|
||||
ScriptLoadInfo& loadInfo = mLoadInfos[aIndex];
|
||||
MOZ_ASSERT(loadInfo.mCacheStatus == ScriptLoadInfo::Cached);
|
||||
@ -982,11 +983,18 @@ private:
|
||||
|
||||
MOZ_ASSERT(!loadInfo.mScriptTextBuf);
|
||||
|
||||
DebugOnly<nsresult> rv =
|
||||
nsresult rv =
|
||||
nsScriptLoader::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);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mWorkerPrivate->SetBaseURI(finalURI);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
DataReceived();
|
||||
|
Loading…
Reference in New Issue
Block a user