Latest commit caa7b75 Sep 15, 2016 @cyco cyco committed with arv Use universal method of finding the global object (#2132)
The module store, runtime and symbol polyfills need access to the global
object. This was done by checking the existence of window, global, self
and falling back to this if none were defined. This can fail for two
reasons. First, 'this' should be expected to be set to undefined during
module definitions (as is the case for symbols.js), thus rendering the
fallback useless. Secondly some JavaScript implementations (e.g. JavaScript
-Core Framework) might not even define a name for the global object that
could be accessed within modules.
By using the Function-Constructor we create a new function in non-strict
mode which has its thisArg set to the global object if no other thisArg
is provided.