Assertion failure: !aOriginalOpener || !aOpener || nsGlobalWindowOuter::Cast(aOpener)->IsClosedOrClosing() || aOpener->GetBrowsingContext()->Id() == GetBrowsingContext()->GetOpenerId(), at src/dom/base/nsGlobalWindowOuter.cpp:2503

RESOLVED FIXED in Firefox 68

Status

()

defect
P2
normal
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: tsmith, Assigned: farre)

Tracking

(Blocks 1 bug, {assertion, crash, testcase})

unspecified
mozilla68
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Fission Milestone:M2, firefox-esr60 unaffected, firefox66 wontfix, firefox67 wontfix, firefox68 fixed)

Details

Attachments

(2 attachments)

Reporter

Description

3 months ago
Posted file testcase.html

To reproduce with attached test case:

  1. set prefs
    • dom.allow_scripts_to_close_windows = true
    • dom.disable_open_during_load = false
  2. serve via a web server

Reduced with m-c:
BuildID=20190325155230
SourceStamp=df3fda80bbeb71d4e1b10e8d205d740b2f959d9e

Assertion failure: !aOriginalOpener || !aOpener || nsGlobalWindowOuter::Cast(aOpener)->IsClosedOrClosing() || aOpener->GetBrowsingContext()->Id() == GetBrowsingContext()->GetOpenerId(), at src/dom/base/nsGlobalWindowOuter.cpp:2503

0|0|libxul.so|nsGlobalWindowOuter::SetOpenerWindow(nsPIDOMWindowOuter*, bool)|hg:hg.mozilla.org/mozilla-central:dom/base/nsGlobalWindowOuter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|2503|0x0
0|1|libxul.so|nsWindowWatcher::ReadyOpenedDocShellItem(nsIDocShellTreeItem*, nsPIDOMWindowOuter*, bool, bool, mozIDOMWindowProxy**)|hg:hg.mozilla.org/mozilla-central:toolkit/components/windowwatcher/nsWindowWatcher.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|1995|0x1b
0|2|libxul.so|nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsIArray*, bool, bool, nsDocShellLoadState*, mozIDOMWindowProxy**)|hg:hg.mozilla.org/mozilla-central:toolkit/components/windowwatcher/nsWindowWatcher.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|931|0x20
0|3|libxul.so|nsWindowWatcher::OpenWindow2(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsISupports*, bool, bool, nsDocShellLoadState*, mozIDOMWindowProxy**)|hg:hg.mozilla.org/mozilla-central:toolkit/components/windowwatcher/nsWindowWatcher.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|369|0xa
0|4|libxul.so|nsGlobalWindowOuter::OpenInternal(nsTSubstring<char16_t> const&, nsTSubstring<char16_t> const&, nsTSubstring<char16_t> const&, bool, bool, bool, bool, bool, nsIArray*, nsISupports*, nsDocShellLoadState*, bool, nsPIDOMWindowOuter**)|hg:hg.mozilla.org/mozilla-central:dom/base/nsGlobalWindowOuter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|7181|0x3c
0|5|libxul.so|nsGlobalWindowOuter::OpenJS(nsTSubstring<char16_t> const&, nsTSubstring<char16_t> const&, nsTSubstring<char16_t> const&, nsPIDOMWindowOuter**)|hg:hg.mozilla.org/mozilla-central:dom/base/nsGlobalWindowOuter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|5703|0x18
0|6|libxul.so|nsGlobalWindowOuter::OpenOuter(nsTSubstring<char16_t> const&, nsTSubstring<char16_t> const&, nsTSubstring<char16_t> const&, mozilla::ErrorResult&)|hg:hg.mozilla.org/mozilla-central:dom/base/nsGlobalWindowOuter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|5666|0x1d
0|7|libxul.so|nsGlobalWindowInner::Open(nsTSubstring<char16_t> const&, nsTSubstring<char16_t> const&, nsTSubstring<char16_t> const&, mozilla::ErrorResult&)|hg:hg.mozilla.org/mozilla-central:dom/base/nsGlobalWindowInner.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|3633|0x1b
0|8|libxul.so|mozilla::dom::Window_Binding::open|s3:gecko-generated-sources:d162369fcadfb57bf08caf567a58884dad100a0a5583be3d6888a8d5c15cab29e69c6953114bfc5638ab5e4fa922f6232fd156c93bbffc46bcdef8723c848135/dom/bindings/WindowBinding.cpp:|2866|0x2d
0|9|libxul.so|bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::MaybeGlobalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*)|hg:hg.mozilla.org/mozilla-central:dom/bindings/BindingUtils.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|3144|0x9
0|10|libxul.so|CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|442|0x6
0|11|libxul.so|js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|534|0xf
0|12|libxul.so|InternalCall|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|589|0xd
0|13|libxul.so|Interpret|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|593|0xf
0|14|libxul.so|js::RunScript(JSContext*, js::RunState&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|422|0xb
0|15|libxul.so|js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|562|0xf
0|16|libxul.so|InternalCall|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|589|0xd
0|17|libxul.so|js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|605|0x5
0|18|libxul.so|JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>)|hg:hg.mozilla.org/mozilla-central:js/src/jsapi.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|2621|0x1c
0|19|libxul.so|mozilla::dom::EventHandlerNonNull::Call(JSContext*, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&)|s3:gecko-generated-sources:dafac6be8e3b1ee47b0fd4e3626adcead4e8b6972893a874a42c3c169de16cc66db2a5fb65096721344c4281b9f417471aeb3498f9f910d238dc6ba80e83b4cf/dom/bindings/EventHandlerBinding.cpp:|266|0x5
0|20|libxul.so|mozilla::JSEventHandler::HandleEvent(mozilla::dom::Event*)|s3:gecko-generated-sources:400f5854eaa0ecaed3e4b6de4ef056ff5ed59f33939cee029fcff1b03eeff195f4c1df1e3e5019f96bbe28beb9ac8b7f3c48e72df24fb254eded6e83edd51671/dist/include/mozilla/dom/EventHandlerBinding.h:|363|0x1f
0|21|libxul.so|mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*)|hg:hg.mozilla.org/mozilla-central:dom/events/EventListenerManager.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|1044|0xc
0|22|libxul.so|mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool)|hg:hg.mozilla.org/mozilla-central:dom/events/EventListenerManager.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|1239|0x19
0|23|libxul.so|mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&)|hg:hg.mozilla.org/mozilla-central:dom/events/EventListenerManager.h:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|356|0x6
0|24|libxul.so|mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&)|hg:hg.mozilla.org/mozilla-central:dom/events/EventDispatcher.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|553|0x12
0|25|libxul.so|mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*)|hg:hg.mozilla.org/mozilla-central:dom/events/EventDispatcher.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|1049|0x1a
0|26|libxul.so|nsDocumentViewer::LoadComplete(nsresult)|hg:hg.mozilla.org/mozilla-central:layout/base/nsDocumentViewer.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|1102|0x25
0|27|libxul.so|nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult)|hg:hg.mozilla.org/mozilla-central:docshell/base/nsDocShell.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|6596|0x18
0|28|libxul.so|nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult)|hg:hg.mozilla.org/mozilla-central:docshell/base/nsDocShell.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|6397|0x18
0|29|libxul.so|nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult)|hg:hg.mozilla.org/mozilla-central:uriloader/base/nsDocLoader.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|1312|0x2b
0|30|libxul.so|nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult)|hg:hg.mozilla.org/mozilla-central:uriloader/base/nsDocLoader.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|871|0x22
0|31|libxul.so|nsDocLoader::DocLoaderIsEmpty(bool)|hg:hg.mozilla.org/mozilla-central:uriloader/base/nsDocLoader.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|709|0x15
0|32|libxul.so|nsDocLoader::DocLoaderIsEmpty(bool)|hg:hg.mozilla.org/mozilla-central:uriloader/base/nsDocLoader.h:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|203|0xd
0|33|libxul.so|nsDocLoader::OnStopRequest(nsIRequest*, nsresult)|hg:hg.mozilla.org/mozilla-central:uriloader/base/nsDocLoader.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|597|0x16
0|34|libxul.so|mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult)|hg:hg.mozilla.org/mozilla-central:netwerk/base/nsLoadGroup.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|568|0x17
0|35|libxul.so|mozilla::net::HttpChannelChild::DoOnStopRequest(nsIRequest*, nsresult, nsISupports*)|hg:hg.mozilla.org/mozilla-central:netwerk/protocol/http/HttpChannelChild.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|1252|0x11
0|36|libxul.so|mozilla::net::HttpChannelChild::OnStopRequest(nsresult const&, mozilla::net::ResourceTimingStruct const&, mozilla::net::nsHttpHeaderArray const&)|hg:hg.mozilla.org/mozilla-central:netwerk/protocol/http/HttpChannelChild.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|1114|0x10
0|37|libxul.so|mozilla::net::ChannelEventQueue::FlushQueue()|hg:hg.mozilla.org/mozilla-central:netwerk/ipc/ChannelEventQueue.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|90|0x11
0|38|libxul.so|mozilla::net::ChannelEventQueue::ResumeInternal()::CompleteResumeRunnable::Run()|||0x10d
0|39|libxul.so|mozilla::SchedulerGroup::Runnable::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/threads/SchedulerGroup.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|295|0x15
0|40|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|1180|0x15
0|41|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThreadUtils.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|482|0x11
0|42|libxul.so|mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|88|0xa
0|43|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|315|0x17
0|44|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|308|0x8
0|45|libxul.so|nsBaseAppShell::Run()|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|137|0xd
0|46|libxul.so|XRE_RunAppShell()|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsEmbedFunctions.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|933|0x11
0|47|libxul.so|mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|238|0x5
0|48|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|315|0x17
0|49|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|308|0x8
0|50|libxul.so|XRE_InitChildProcess(int, char**, XREChildData const*)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsEmbedFunctions.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|771|0xc
0|51|firefox-bin|content_process_main(mozilla::Bootstrap*, int, char**)|hg:hg.mozilla.org/mozilla-central:ipc/contentproc/plugin-container.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|56|0x14
0|52|firefox-bin|main|hg:hg.mozilla.org/mozilla-central:browser/app/nsBrowserApp.cpp:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|263|0x11
0|53|libc-2.23.so||||0x20830
0|54|firefox-bin|MOZ_ReportCrash|hg:hg.mozilla.org/mozilla-central:mfbt/Assertions.h:df3fda80bbeb71d4e1b10e8d205d740b2f959d9e|184|0x5
Flags: in-testsuite?

Andreas may have ideas as he touched that assertion in bug 1510928.

Flags: needinfo?(afarre)
Assignee

Updated

2 months ago
Assignee: nobody → afarre
Status: NEW → ASSIGNED
Flags: needinfo?(afarre)
Priority: -- → P2

Comment 3

2 months ago
Pushed by afarre@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a9fe791a62cc
Don't assert when setting opener on a closed window. r=nika

Comment 4

2 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Updated

2 months ago
Fission Milestone: --- → M2
You need to log in before you can comment on or make changes to this bug.