mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Backed out changeset f74c9d255293 (bug 1568055) for Assertion failures (MOZ_ASSERT_UNREACHABLE: leaking stream event). CLOSED TREE
This commit is contained in:
parent
5f131d63bd
commit
78f3381905
@ -324,20 +324,16 @@ static already_AddRefed<BrowsingContext> CreateBrowsingContext(
|
||||
nsAutoString frameName;
|
||||
GetFrameName(aOwner, frameName);
|
||||
|
||||
RefPtr<BrowsingContext> browsingContext;
|
||||
if (IsTopContent(parentContext, aOwner)) {
|
||||
// Create toplevel content without a parent & as Type::Content.
|
||||
browsingContext = BrowsingContext::Create(nullptr, aOpener, frameName,
|
||||
BrowsingContext::Type::Content);
|
||||
} else {
|
||||
auto type = parentContext->IsContent() ? BrowsingContext::Type::Content
|
||||
: BrowsingContext::Type::Chrome;
|
||||
browsingContext =
|
||||
BrowsingContext::Create(parentContext, aOpener, frameName, type);
|
||||
return BrowsingContext::Create(nullptr, aOpener, frameName,
|
||||
BrowsingContext::Type::Content);
|
||||
}
|
||||
|
||||
browsingContext->SetEmbedderElement(aOwner);
|
||||
return browsingContext.forget();
|
||||
auto type = parentContext->IsContent() ? BrowsingContext::Type::Content
|
||||
: BrowsingContext::Type::Chrome;
|
||||
|
||||
return BrowsingContext::Create(parentContext, aOpener, frameName, type);
|
||||
}
|
||||
|
||||
nsFrameLoader* nsFrameLoader::Create(Element* aOwner, BrowsingContext* aOpener,
|
||||
|
@ -88,12 +88,6 @@ void WindowGlobalParent::Init(const WindowGlobalInit& aInit) {
|
||||
mBrowsingContext = CanonicalBrowsingContext::Cast(aInit.browsingContext());
|
||||
MOZ_ASSERT(mBrowsingContext);
|
||||
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
!mBrowsingContext->GetParent() ||
|
||||
mBrowsingContext->GetEmbedderWindowGlobal(),
|
||||
"When creating a non-root WindowGlobalParent, the WindowGlobalParent "
|
||||
"for our embedder should've already been created.");
|
||||
|
||||
// Attach ourself to the browsing context.
|
||||
mBrowsingContext->RegisterWindowGlobal(this);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user