Closed
Description
- Electron version: 1.4.3
- Operating system: MacOS 10.12
I created an app demonstrating the issue: https://github.com/pfrazee/electron-bug-securewebviewcrash. Let me know if you have trouble reproducing.
This occurs around a webview:
<webview id="theWebview" src="custom://webview.html" preload="./webview-preload.js"></webview>
The webview opens a custom protocol, which is registered as follows:
protocol.registerStandardSchemes(['custom'])
app.on('ready', () => {
protocol.registerHttpProtocol('custom', (req, cb) => {
cb({ method: 'GET', url: 'http://localhost:12345' })
}, () => console.log('Registered "custom" protocol'))
})
http.createServer((req, res) => res.end('Hello, world. This is the webview')).listen(12345)
The webview has a preload script which registers it as a secure protocol:
var { webFrame } = require('electron')
webFrame.registerURLSchemeAsPrivileged('custom')
For some reason, this combination causes devtools to crash the webview when the Application tab is opened. I used the more fine-grained controls in #7665 to isolate this specifically to the "secure" flag.