From 096439dce7d3e9438ede6fbcdfca2291cd5504e3 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 14 Jul 2015 08:38:54 -0700 Subject: [PATCH 1/2] Don't expose "global" when node integration is off --- atom/renderer/lib/init.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/atom/renderer/lib/init.coffee b/atom/renderer/lib/init.coffee index 196891554d..32d3ee76d1 100644 --- a/atom/renderer/lib/init.coffee +++ b/atom/renderer/lib/init.coffee @@ -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 From b6e8420bf2bd6bab0bad52aae8f1871907ec19a2 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 14 Jul 2015 08:42:03 -0700 Subject: [PATCH 2/2] spec: Check if window.global is set --- spec/fixtures/pages/c.html | 2 +- spec/webview-spec.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/fixtures/pages/c.html b/spec/fixtures/pages/c.html index f0e33fde5e..bc55104ec5 100644 --- a/spec/fixtures/pages/c.html +++ b/spec/fixtures/pages/c.html @@ -1,7 +1,7 @@ diff --git a/spec/webview-spec.coffee b/spec/webview-spec.coffee index cd22e57a18..b47c72ac0f 100644 --- a/spec/webview-spec.coffee +++ b/spec/webview-spec.coffee @@ -34,7 +34,7 @@ describe ' 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