Description
OS: Windows 8.1 x64
Atom-Shell: 0.19
Sorry for all the editing and deleting of my previous reports but the issue is morphing and I've narrowed it down. Apparently the webview is garbage collected when you set it's CSS display property to none. If you do this then you cannot use the webview again and if you try to set it's src it will crash Atom-Shell.
<!DOCTYPE html>
<html>
<head>
<title>webview crash test</title>
</head>
<body>
<webview id="web" style="width:100%;height:100%;position:absolute;"></webview>
<script>
window.onload = function() {
var web = document.getElementById("web");
web.src = "http://msn.com";
};
</script>
</body>
</html>
Reproduce the crash:
In your main.js make sure you have it open the dev tools once it creates a new browser window. Use the dev tools to set the CSS display property for the webview to none. Set the src of the webview using the console. Observe Atom-Shell crash.
Now a point of clarification: This sounds convoluted but I was using display:none to hide the webview, set the source and then show it in my app. I should have been using visibility:hidden instead. My UI is just set up to show the webview in the entire width/height of the window but underneath of it there is a list of links to choose from. This is the reasoning I found this issue. Using visibility:hidden makes the crashing go away.
Question, does calling display:none on the webview cause the webview to be garbage collected?