Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana

The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
This commit is contained in:
Nika Layzell
2020-05-06 17:42:41 +00:00
parent 433d4a4880
commit 442b6e970e
20 changed files with 88 additions and 200 deletions

View File

@@ -10,6 +10,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ScriptSettings.h" // for AutoJSAPI
#include "mozilla/dom/BrowsingContext.h"
#include "nsContentUtils.h"
#include "xpcpublic.h"
@@ -17,6 +18,32 @@ namespace mozilla {
NS_IMPL_ISUPPORTS(LoadContext, nsILoadContext, nsIInterfaceRequestor)
LoadContext::LoadContext(const IPC::SerializedLoadContext& aToCopy,
dom::Element* aTopFrameElement,
OriginAttributes& aAttrs)
: mTopFrameElement(do_GetWeakReference(aTopFrameElement)),
mIsContent(aToCopy.mIsContent),
mUseRemoteTabs(aToCopy.mUseRemoteTabs),
mUseRemoteSubframes(aToCopy.mUseRemoteSubframes),
mUseTrackingProtection(aToCopy.mUseTrackingProtection),
#ifdef DEBUG
mIsNotNull(aToCopy.mIsNotNull),
#endif
mOriginAttributes(aAttrs) {
}
LoadContext::LoadContext(OriginAttributes& aAttrs)
: mTopFrameElement(nullptr),
mIsContent(false),
mUseRemoteTabs(false),
mUseRemoteSubframes(false),
mUseTrackingProtection(false),
#ifdef DEBUG
mIsNotNull(true),
#endif
mOriginAttributes(aAttrs) {
}
LoadContext::LoadContext(nsIPrincipal* aPrincipal,
nsILoadContext* aOptionalBase)
: mTopFrameElement(nullptr),
@@ -40,6 +67,8 @@ LoadContext::LoadContext(nsIPrincipal* aPrincipal,
aOptionalBase->GetUseTrackingProtection(&mUseTrackingProtection));
}
LoadContext::~LoadContext() = default;
//-----------------------------------------------------------------------------
// LoadContext::nsILoadContext
//-----------------------------------------------------------------------------