mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 11:27:49 +00:00
Bug 1648679 - Allow setting UseErrorPages from the parent process. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D81484
This commit is contained in:
parent
9356971435
commit
ed35966cff
@ -341,6 +341,7 @@ already_AddRefed<BrowsingContext> BrowsingContext::CreateIndependent(
|
||||
RefPtr<BrowsingContext> bc(
|
||||
CreateDetached(nullptr, nullptr, EmptyString(), aType));
|
||||
bc->mWindowless = bc->IsContent();
|
||||
bc->mEmbeddedByThisProcess = true;
|
||||
bc->EnsureAttached();
|
||||
return bc.forget();
|
||||
}
|
||||
@ -2179,13 +2180,10 @@ bool BrowsingContext::CanSet(FieldIndex<IDX_PlatformOverride>,
|
||||
}
|
||||
|
||||
bool BrowsingContext::CheckOnlyEmbedderCanSet(ContentParent* aSource) {
|
||||
if (aSource) {
|
||||
// Set by a content process, verify that it's this BC's embedder.
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
return Canonical()->IsEmbeddedInProcess(aSource->ChildID());
|
||||
if (XRE_IsParentProcess()) {
|
||||
uint64_t childId = aSource ? aSource->ChildID() : 0;
|
||||
return Canonical()->IsEmbeddedInProcess(childId);
|
||||
}
|
||||
|
||||
// In-process case, verify that we've been embedded in this process.
|
||||
return mEmbeddedByThisProcess;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user