I don't know if we want window.open() to do anything in AppShell[1], but it currently hits a NOTREACHED[1]. In Release, where NOTREACHED isn't fatal, closing the app triggers a seg fault. It looks like it's trying to remove a window that isn't there.
Received signal 11 SEGV_MAPERR ffffd9791933e5ec
#0 0x000001630357 base::debug::StackTrace::StackTrace()
#1 0x00000162fecf base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7ff85c83f330 <unknown>
#3 0x000000a1b70a content::RenderWidgetHostViewAura::RemovingFromRootWindow()
#4 0x00000244e339 aura::Window::NotifyRemovingFromRootWindow()
#5 0x00000244e38b aura::Window::NotifyRemovingFromRootWindow()
#6 0x00000244d38b aura::Window::RemoveChildImpl()
#7 0x00000244ba54 aura::Window::RemoveOrDestroyChildren()
#8 0x00000244b57c aura::Window::~Window()
#9 0x00000244bcb9 aura::Window::~Window()
#10 0x000002453b63 aura::WindowTreeHost::DestroyDispatcher()
#11 0x000002454676 aura::WindowTreeHostX11::~WindowTreeHostX11()
#12 0x000002454709 aura::WindowTreeHostX11::~WindowTreeHostX11()
#13 0x00000044e9d5 extensions::ShellDesktopControllerAura::DestroyRootWindow()
#14 0x00000044e7c2 extensions::ShellDesktopControllerAura::~ShellDesktopControllerAura()
#15 0x00000044ea39 extensions::ShellDesktopControllerAura::~ShellDesktopControllerAura()
#16 0x000000447487 extensions::ShellBrowserMainParts::PostMainMessageLoopRun()
#17 0x0000007d3910 content::BrowserMainLoop::ShutdownThreadsAndCleanUp()
#18 0x0000007d633d content::BrowserMainRunnerImpl::Shutdown()
#19 0x0000007cecf3 content::BrowserMain()
#20 0x000001494fd8 content::ContentMainRunnerImpl::Run()
#21 0x0000024cbeb1 service_manager::Main()
#22 0x000001493f32 content::ContentMain()
#23 0x000000443a01 main
#24 0x7ff85793af45 __libc_start_main
If window.open should *not* work, we shouldn't try to create the WebContents.
But window.open may be desirable, if we want to allow creating popups in AppShell. Or access to background pages.. which I don't really understand at this point.
[1] in Chrome, window.open() in an app opens a new tab for the user. It seems to return
[2]
ERROR:shell_app_delegate.cc(50)] Not implemented reached in virtual void extensions::ShellAppDelegate::AddNewContents(content::BrowserContext *, content::WebContents *, WindowOpenDisposition, const gfx::Rect &, bool, bool *)
Comment 1 by michae...@chromium.org
, May 9 2018Owner: ----