Merge pull request #2215 from atom/delete-global

Don't expose "global" when node integration is off
This commit is contained in:
Cheng Zhao 2015-07-14 09:53:44 -07:00
commit 076942ca7a
3 changed files with 3 additions and 2 deletions

View file

@ -93,6 +93,7 @@ else
delete global.process
delete global.setImmediate
delete global.clearImmediate
delete global.global
# Load the script specfied by the "preload" attribute.
if preloadScript

View file

@ -1,7 +1,7 @@
<html>
<body>
<script type="text/javascript" charset="utf-8">
console.log([typeof require, typeof module, typeof process].join(' '));
console.log([typeof require, typeof module, typeof process, typeof global].join(' '));
</script>
</body>
</html>

View file

@ -34,7 +34,7 @@ describe '<webview> tag', ->
describe 'nodeintegration attribute', ->
it 'inserts no node symbols when not set', (done) ->
webview.addEventListener 'console-message', (e) ->
assert.equal e.message, 'undefined undefined undefined'
assert.equal e.message, 'undefined undefined undefined undefined'
done()
webview.src = "file://#{fixtures}/pages/c.html"
document.body.appendChild webview