Skip to content

Commit

Permalink
eval to get global, not Function
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Mar 13, 2016
1 parent 943cf9b commit 7175b99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hookupSES.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"use strict";

// Still valid. Won't be after startSES is called.
var global = (new Function('return this;'))();
var global = (1,eval)('this');

try {
if (!ses.okToLoad()) {
Expand Down

1 comment on commit 7175b99

@kriskowal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It occurs to me that self is global in both worker and window scripts. We could make self global in the Node.js context to cover all three.

Please sign in to comment.