Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Merge mozilla-central to autoland. a=merge CLOSED TREE
Browse files Browse the repository at this point in the history
  • Loading branch information
Archaeopteryx committed Nov 6, 2019
2 parents de6a501 + 0f2e500 commit f8253b4
Show file tree
Hide file tree
Showing 80 changed files with 5,721 additions and 1,207 deletions.
2 changes: 2 additions & 0 deletions docshell/base/BrowsingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ already_AddRefed<BrowsingContext> BrowsingContext::Create(
context->mEmbedderPolicy = inherit->mEmbedderPolicy;
}

nsContentUtils::GenerateUUIDInPlace(context->mHistoryID);

Register(context);

// Attach the browsing context to the tree.
Expand Down
1 change: 1 addition & 0 deletions docshell/base/BrowsingContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "mozilla/dom/UserActivation.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsID.h"
#include "nsIDocShell.h"
#include "nsString.h"
#include "nsTArray.h"
Expand Down
2 changes: 2 additions & 0 deletions docshell/base/BrowsingContextFieldList.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ MOZ_BC_FIELD(FeaturePolicy, RefPtr<mozilla::dom::FeaturePolicy>)
// See nsSandboxFlags.h for the possible flags.
MOZ_BC_FIELD(SandboxFlags, uint32_t)

MOZ_BC_FIELD(HistoryID, nsID)

#undef MOZ_BC_FIELD
6 changes: 4 additions & 2 deletions docshell/base/CanonicalBrowsingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,14 @@ JSObject* CanonicalBrowsingContext::WrapObject(
void CanonicalBrowsingContext::Traverse(
nsCycleCollectionTraversalCallback& cb) {
CanonicalBrowsingContext* tmp = this;
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindowGlobals, mCurrentWindowGlobal);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindowGlobals, mCurrentWindowGlobal,
mSessionHistory);
}

void CanonicalBrowsingContext::Unlink() {
CanonicalBrowsingContext* tmp = this;
NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindowGlobals, mCurrentWindowGlobal);
NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindowGlobals, mCurrentWindowGlobal,
mSessionHistory);
}

void CanonicalBrowsingContext::NotifyStartDelayedAutoplayMedia() {
Expand Down
7 changes: 7 additions & 0 deletions docshell/base/CanonicalBrowsingContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "nsWrapperCache.h"
#include "nsTHashtable.h"
#include "nsHashKeys.h"
#include "nsISHistory.h"

class nsIDocShell;

Expand Down Expand Up @@ -60,6 +61,10 @@ class CanonicalBrowsingContext final : public BrowsingContext {

already_AddRefed<WindowGlobalParent> GetEmbedderWindowGlobal() const;

nsISHistory* GetSessionHistory() { return mSessionHistory; }
void SetSessionHistory(nsISHistory* aSHistory) {
mSessionHistory = aSHistory;
}
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;

Expand Down Expand Up @@ -144,6 +149,8 @@ class CanonicalBrowsingContext final : public BrowsingContext {

// The current remoteness change which is in a pending state.
RefPtr<PendingRemotenessChange> mPendingRemotenessChange;

nsCOMPtr<nsISHistory> mSessionHistory;
};

} // namespace dom
Expand Down
Loading

0 comments on commit f8253b4

Please sign in to comment.