Bug 1865918 p3. Update CreateContentViewer to reflect nsIDocumentViewer's new name. r=emilio

Depends on D194288

Differential Revision: https://phabricator.services.mozilla.com/D194289
This commit is contained in:
Jonathan Watt 2023-11-22 13:50:57 +00:00
Родитель cd0692dbfd
Коммит 9ef102ce24
6 изменённых файлов: 17 добавлений и 16 удалений

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

@ -164,7 +164,8 @@ nsDSURIContentListener::DoContent(const nsACString& aContentType,
copy.forget(aContentHandler);
rv = NS_OK;
} else {
rv = docShell->CreateContentViewer(aContentType, aRequest, aContentHandler);
rv =
docShell->CreateDocumentViewer(aContentType, aRequest, aContentHandler);
if (NS_SUCCEEDED(rv) && reuseCV) {
mExistingJPEGStreamListener = *aContentHandler;
} else {

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

@ -4249,7 +4249,7 @@ nsDocShell::Stop(uint32_t aStopFlags) {
if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {
// Suspend any timers that were set for this loader. We'll clear
// them out for good in CreateContentViewer.
// them out for good in CreateDocumentViewer.
if (mRefreshURIList) {
SuspendRefreshURIs();
mSavedRefreshURIList.swap(mRefreshURIList);
@ -7074,7 +7074,7 @@ nsDocShell::BeginRestore(nsIDocumentViewer* aContentViewer, bool aTop) {
if (!aTop) {
// This point corresponds to us having gotten OnStartRequest or
// STATE_START, so do the same thing that CreateContentViewer does at
// STATE_START, so do the same thing that CreateDocumentViewer does at
// this point to ensure that unload/pagehide events for this document
// will fire when it's unloaded again.
mFiredUnloadEvent = false;
@ -7248,7 +7248,7 @@ nsresult nsDocShell::RestoreFromHistory() {
MOZ_ASSERT(mRestorePresentationEvent.IsPending());
PresentationEventForgetter forgetter(mRestorePresentationEvent);
// This section of code follows the same ordering as CreateContentViewer.
// This section of code follows the same ordering as CreateDocumentViewer.
if (!mLSHE) {
return NS_ERROR_FAILURE;
}
@ -7508,7 +7508,7 @@ nsresult nsDocShell::RestoreFromHistory() {
/* aLocationFlags */ 0);
}
// This is the end of our CreateContentViewer() replacement.
// This is the end of our CreateDocumentViewer() replacement.
// Now we simulate a load. First, we restore the state of the javascript
// window object.
nsCOMPtr<nsPIDOMWindowOuter> privWin = GetWindow();
@ -7711,9 +7711,9 @@ nsresult nsDocShell::RestoreFromHistory() {
return privWin->FireDelayedDOMEvents(true);
}
nsresult nsDocShell::CreateContentViewer(const nsACString& aContentType,
nsIRequest* aRequest,
nsIStreamListener** aContentHandler) {
nsresult nsDocShell::CreateDocumentViewer(const nsACString& aContentType,
nsIRequest* aRequest,
nsIStreamListener** aContentHandler) {
if (DocGroup::TryToLoadIframesInBackground()) {
ResetToFirstLoad();
}

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

@ -580,9 +580,9 @@ class nsDocShell final : public nsDocLoader,
bool aTryToSaveOldPresentation = true, bool aCheckPermitUnload = true,
mozilla::dom::WindowGlobalChild* aActor = nullptr);
nsresult CreateContentViewer(const nsACString& aContentType,
nsIRequest* aRequest,
nsIStreamListener** aContentHandler);
nsresult CreateDocumentViewer(const nsACString& aContentType,
nsIRequest* aRequest,
nsIStreamListener** aContentHandler);
nsresult NewContentViewerObj(const nsACString& aContentType,
nsIRequest* aRequest, nsILoadGroup* aLoadGroup,
@ -1235,7 +1235,7 @@ class nsDocShell final : public nsDocLoader,
nsCOMPtr<nsIURI> mLoadingURI;
// Set in LoadErrorPage from the method argument and used later
// in CreateContentViewer. We have to delay an shistory entry creation
// in CreateDocumentViewer. We have to delay an shistory entry creation
// for which these objects are needed.
nsCOMPtr<nsIURI> mFailedURI;
nsCOMPtr<nsIChannel> mFailedChannel;
@ -1324,7 +1324,7 @@ class nsDocShell final : public nsDocLoader,
bool mIsExecutingOnLoadHandler : 1;
// Indicates to CreateContentViewer() that it is safe to cache the old
// Indicates to CreateDocumentViewer() that it is safe to cache the old
// presentation of the page, and to SetupNewViewer() that the old viewer
// should be passed a SHEntry to save itself into.
// Only used with SHIP disabled.

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

@ -2812,7 +2812,7 @@ void Document::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup) {
// Note: this code is duplicated in PrototypeDocumentContentSink::Init and
// nsScriptSecurityManager::GetChannelResultPrincipals.
// Note: this should match the uri used for the OnNewURI call in
// nsDocShell::CreateContentViewer.
// nsDocShell::CreateDocumentViewer.
NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
nsIScriptSecurityManager* securityManager =

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

@ -110,7 +110,7 @@ nsresult PrototypeDocumentContentSink::Init(Document* aDoc, nsIURI* aURI,
mDocument->SetMayStartLayout(false);
// Get the URI. this should match the uri used for the OnNewURI call in
// nsDocShell::CreateContentViewer.
// nsDocShell::CreateDocumentViewer.
nsresult rv = NS_GetFinalChannelURI(aChannel, getter_AddRefs(mDocumentURI));
NS_ENSURE_SUCCESS(rv, rv);

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

@ -78,7 +78,7 @@ previously allocated by thread T0 here:
Line 642 of "/builds/slave/m-in-l64-asan-0000000000000000/build/layout/base/nsDocumentViewer.cpp"
#4 0x7f0fe929f537 (libxul.so!nsDocShell::Embed(nsIDocumentViewer*, char const*, nsISupports*)+0xe7)
Line 6397 of "/builds/slave/m-in-l64-asan-0000000000000000/build/docshell/base/nsDocShell.cpp"
#5 0x7f0fe92b14f4 (libxul.so!nsDocShell::CreateContentViewer(char const*, nsIRequest*, nsIStreamListener**)+0x1084)
#5 0x7f0fe92b14f4 (libxul.so!nsDocShell::CreateDocumentViewer(char const*, nsIRequest*, nsIStreamListener**)+0x1084)
Line 8173 of "/builds/slave/m-in-l64-asan-0000000000000000/build/docshell/base/nsDocShell.cpp"
#6 0x7f0fe9254ad4 (libxul.so!nsDSURIContentListener::DoContent(char const*, bool, nsIRequest*, nsIStreamListener**, bool*)+0x304)
Line 122 of "/builds/slave/m-in-l64-asan-0000000000000000/build/docshell/base/nsDSURIContentListener.cpp"