Merge pull request #2215 from atom/delete-global
Don't expose "global" when node integration is off
This commit is contained in:
commit
076942ca7a
3 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
2
spec/fixtures/pages/c.html
vendored
2
spec/fixtures/pages/c.html
vendored
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue