Bug 1398484 Only assert that the channel does not change for top level service worker scripts. r=baku

This commit is contained in:
Ben Kelly 2017-09-13 05:53:54 -07:00
Родитель 43ae4b41dc
Коммит f43590de33
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -680,7 +680,12 @@ private:
ScriptLoadInfo& loadInfo = mLoadInfos[aIndex];
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
MOZ_ASSERT(channel == loadInfo.mChannel);
// Note that importScripts() can redirect. In theory the main
// script could also encounter an internal redirect, but currently
// the assert does not allow that.
MOZ_ASSERT_IF(mIsMainScript, channel == loadInfo.mChannel);
loadInfo.mChannel = channel;
// We synthesize the result code, but its never exposed to content.
RefPtr<mozilla::dom::InternalResponse> ir =