Backed out changeset 404955e976d6 (bug 1658454) for causing build bustages in nsDocShell.cpp CLOSED TREE

This commit is contained in:
Noemi Erli 2020-08-14 01:30:50 +03:00
Родитель 3cce4b4e65
Коммит b7c6d9d228
8 изменённых файлов: 3 добавлений и 76 удалений

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

@ -8537,10 +8537,7 @@ nsresult nsDocShell::HandleSameDocumentNavigation(
// Make sure we won't just repost without hitting the
// cache first
if (cacheKey != 0) {
// XXX Update this call to deal with mLoadingEntry or mActiveEntry once
// the whole HandleSameDocumentNavigation is updated to work with
// SessionHistoryInfo objects!
SetCacheKeyOnHistoryEntry(mOSHE, nullptr, cacheKey);
mOSHE->SetCacheKey(cacheKey);
}
}
@ -10312,17 +10309,10 @@ bool nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel,
// If we already have a loading history entry, store the new cache key
// in it. Otherwise, since we're doing a reload and won't be updating
// our history entry, store the cache key in our current history entry.
if (mLoadingEntry) {
SetCacheKeyOnHistoryEntry(nullptr, &mLoadingEntry->mInfo, cacheKey);
} else if (mActiveEntry) {
SetCacheKeyOnHistoryEntry(nullptr, mActiveEntry.get(), cacheKey);
}
if (mLSHE) {
SetCacheKeyOnHistoryEntry(mLSHE, nullptr, cacheKey);
mLSHE->SetCacheKey(cacheKey);
} else if (mOSHE) {
SetCacheKeyOnHistoryEntry(mOSHE, nullptr, cacheKey);
mOSHE->SetCacheKey(cacheKey);
}
// Since we're force-reloading, clear all the sub frame history.
@ -10819,29 +10809,6 @@ void nsDocShell::SetScrollRestorationIsManualOnHistoryEntry(
}
}
void nsDocShell::SetCacheKeyOnHistoryEntry(
nsISHEntry* aSHEntry, mozilla::dom::SessionHistoryInfo* aInfo,
uint32_t aCacheKey) {
if (aSHEntry) {
aSHEntry->SetCacheKey(aCacheKey);
}
if (aInfo) {
aInfo->SetCacheKey(aCacheKey);
if (XRE_IsParentProcess()) {
SessionHistoryEntry* entry =
SessionHistoryEntry::GetByInfoId(aInfo->Id());
if (entry) {
entry->SetCacheKey(aCacheKey);
}
} else {
mozilla::Unused
<< ContentChild::GetSingleton()->SendSessionHistoryEntryCacheKey(
aInfo->Id(), aCacheKey);
}
}
}
bool nsDocShell::ShouldAddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel) {
// I believe none of the about: urls should go in the history. But then
// that could just be me... If the intent is only deny about:blank then we

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

@ -1053,10 +1053,6 @@ class nsDocShell final : public nsDocLoader,
nsISHEntry* aSHEntry, mozilla::dom::SessionHistoryInfo* aInfo,
bool aIsManual);
void SetCacheKeyOnHistoryEntry(nsISHEntry* aSHEntry,
mozilla::dom::SessionHistoryInfo* aInfo,
uint32_t aCacheKey);
private: // data members
nsID mHistoryID;
nsString mTitle;

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

@ -943,17 +943,6 @@ void SessionHistoryEntry::UpdateLayoutHistoryState(
}
}
void SessionHistoryEntry::MaybeSynchronizeSharedStateToInfo(
nsISHEntry* aEntry) {
nsCOMPtr<SessionHistoryEntry> entry = do_QueryInterface(aEntry);
if (!entry) {
return;
}
entry->mInfo->mCacheKey = entry->mSharedInfo->mCacheKey;
// XXX Add other member variables which live in mSharedInfo.
}
} // namespace dom
namespace ipc {

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

@ -51,8 +51,6 @@ class SessionHistoryInfo {
mScrollRestorationIsManual = aIsManual;
}
void SetCacheKey(uint32_t aCacheKey) { mCacheKey = aCacheKey; }
nsIURI* GetURI() const { return mURI; }
bool GetURIWasModified() const { return mURIWasModified; }
@ -88,9 +86,6 @@ class SessionHistoryInfo {
// SHEntrySharedParentState::mLayoutHistoryState
nsCOMPtr<nsILayoutHistoryState> mLayoutHistoryState;
// mCacheKey is handled similar way to mLayoutHistoryState.
uint32_t mCacheKey = 0;
uint64_t mId = 0;
bool mLoadReplace = false;
bool mURIWasModified = false;
@ -134,8 +129,6 @@ class SessionHistoryEntry : public nsISHEntry {
static void UpdateLayoutHistoryState(uint64_t aSessionHistoryEntryID,
nsILayoutHistoryState* aState);
static void MaybeSynchronizeSharedStateToInfo(nsISHEntry* aEntry);
private:
virtual ~SessionHistoryEntry();

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

@ -1725,8 +1725,6 @@ void nsSHistory::InitiateLoad(nsISHEntry* aFrameEntry,
aFrameEntry->SetLoadType(aLoadType);
loadState->SetLoadType(aLoadType);
SessionHistoryEntry::MaybeSynchronizeSharedStateToInfo(aFrameEntry);
loadState->SetSHEntry(aFrameEntry);
nsCOMPtr<nsIURI> originalURI = aFrameEntry->GetOriginalURI();

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

@ -6988,16 +6988,6 @@ ContentParent::RecvSessionHistoryEntryScrollRestorationIsManual(
return IPC_OK();
}
mozilla::ipc::IPCResult ContentParent::RecvSessionHistoryEntryCacheKey(
const uint64_t& aSessionHistoryEntryID, const uint32_t& aCacheKey) {
SessionHistoryEntry* entry =
SessionHistoryEntry::GetByInfoId(aSessionHistoryEntryID);
if (entry) {
entry->SetCacheKey(aCacheKey);
}
return IPC_OK();
}
mozilla::ipc::IPCResult ContentParent::RecvCommitWindowContextTransaction(
const MaybeDiscarded<WindowContext>& aContext,
WindowContext::BaseTransaction&& aTransaction, uint64_t aEpoch) {

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

@ -1346,9 +1346,6 @@ class ContentParent final
mozilla::ipc::IPCResult RecvSessionHistoryEntryScrollRestorationIsManual(
const uint64_t& aSessionHistoryEntryID, const bool& aIsManual);
mozilla::ipc::IPCResult RecvSessionHistoryEntryCacheKey(
const uint64_t& aSessionHistoryEntryID, const uint32_t& aCacheKey);
// Notify the ContentChild to enable the input event prioritization when
// initializing.
void MaybeEnableRemoteInputEventQueue();

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

@ -931,9 +931,6 @@ parent:
async SessionHistoryEntryScrollRestorationIsManual(uint64_t aSessionHistoryEntryID,
bool aIsManual);
async SessionHistoryEntryCacheKey(uint64_t aSessionHistoryEntryID,
uint32_t aCacheKey);
async InitBackground(Endpoint<PBackgroundParent> aEndpoint);
async CreateGMPService();