2016-12-01 01:29:50 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title></title>
|
|
|
|
<script>
|
|
|
|
const {ipcRenderer, remote} = require('electron')
|
|
|
|
|
|
|
|
const contents = remote.getCurrentWebContents()
|
|
|
|
|
|
|
|
// This should not trigger a dereference and a remote getURL call should not fail
|
|
|
|
contents.emit('render-view-deleted', {}, 'not-a-process-id')
|
|
|
|
try {
|
|
|
|
contents.getURL()
|
|
|
|
} catch (error) {
|
|
|
|
ipcRenderer.send('error-message', 'Unexpected error on getURL call')
|
|
|
|
}
|
|
|
|
|
|
|
|
// This should trigger a dereference and a remote getURL call should fail
|
2018-09-11 18:18:10 +00:00
|
|
|
contents.emit('render-view-deleted', {}, contents.getProcessId())
|
2016-12-01 01:29:50 +00:00
|
|
|
try {
|
|
|
|
contents.getURL()
|
|
|
|
ipcRenderer.send('error-message', 'No error thrown')
|
|
|
|
} catch (error) {
|
|
|
|
ipcRenderer.send('error-message', error.message)
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|