Repository navigation
Closed
Labels
Description
- Electron version: 1.4.14
- Operating system: macOS
Expected behavior
window.open can be called from a sandboxed <webview> tag.
Actual behavior
Crash occurs:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
VM Regions Near 0:
-->
__TEXT 0000000104491000-0000000104492000 [ 4K] r-x/rwx SM=COW /Users/USER/*/Electron.app/Contents/MacOS/Electron
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 com.github.electron.framework 0x00000001014f3eb1 content::WebContentsImpl::CreateNewWindow(content::SiteInstance*, int, int, int, ViewHostMsg_CreateWindow_Params const&, content::SessionStorageNamespace*) + 769 (web_contents_impl.cc:2044)
1 com.github.electron.framework 0x0000000101419c78 content::RenderViewHostImpl::CreateNewWindow(int, int, int, ViewHostMsg_CreateWindow_Params const&, content::SessionStorageNamespace*) + 200 (render_view_host_impl.cc:903)
2 com.github.electron.framework 0x0000000100a8deab base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask const&) + 187 (callback.h:389)
3 com.github.electron.framework 0x0000000100aaec7c base::MessageLoop::RunTask(base::PendingTask const&) + 508 (vector:640)
4 com.github.electron.framework 0x0000000100aaef8c base::MessageLoop::DeferOrRunPendingTask(base::PendingTask const&) + 44 (message_loop.cc:502)
5 com.github.electron.framework 0x0000000100aaf2eb base::MessageLoop::DoWork() + 299 (message_loop.cc:624)
6 com.github.electron.framework 0x0000000100a8381d base::MessagePumpCFRunLoopBase::RunWork() + 45 (message_pump_mac.mm:330)
7 com.github.electron.framework 0x0000000100aa5c3a base::mac::CallWithEHFrame(void () block_pointer) + 10 (call_with_eh_frame_asm.S:38)
8 com.github.electron.framework 0x0000000100a83224 base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 68 (message_pump_mac.mm:309)
How to reproduce
sandboxed-webview.html
<webview src="./open.html" webpreferences="sandbox=yes" allowpopups></webview>open.html
<script>window.open('about:blank')</script>
Activity
kevinsawicki commentedon Jan 10, 2017
/cc @tarruda are sandboxed
<webview>tags valid to use? This was my first time trying one so I wasn't sure if this case is not fully supported yet.tarruda commentedon Jan 11, 2017
@kevinsawicki sandbox option is not supported in
<webview>yet. I tried to implement but failed and couldn't debug easily(#6919 (comment)). It should not result in crash, however(because the option is ignored, as far as I remember).kevinsawicki commentedon Jan 12, 2017
Okay, closing this out then and it can just be tracked in #6712
This looks to be happening because
BrowserPluginGuestDelegate::CreateNewGuestWindowis not implemented in Electron and it is called fromcontent::WebContentsImpl::CreateNewWindowfor guest web contents.