GitHub PullRequestReviewCommentEvent at 2014-05-12 23:41:56
Repository: systemjs
Actor: caridy
Payload: {"comment":{"url":"https://api.github.com/repos/systemjs/systemjs/pulls/comments/12560181","id":12560181,"diff_hunk":"@@ -1414,7 +1414,17 @@ function __eval(__source, __global, __address, __sourceMap) {\n     __source = (__global != __$global ? 'with(__global) { (function() { ' + __source + ' \\n }).call(__global); }' : __source)\n       + '\\n//# sourceURL=' + __address\n       + (__sourceMap ? '\\n//# sourceMappingURL=' + __sourceMap : '');\n-    eval(__source);\n+    \n+    // we need to ensure eval runs in a global scope\n+    if (__global == __$global) {\n+      __global.__source = __source;\n+      var script = document.createElement('script');\n+      script.innerHTML = 'eval(__source)';","path":"dist/system-production-csp.js","position":10,"original_position":10,"commit_id":"f4e69b6859dfa3f9193f42469359168693cff9b5","original_commit_id":"f4e69b6859dfa3f9193f42469359168693cff9b5","user":{"login":"caridy","id":38969,"avatar_url":"https://avatars.githubusercontent.com/u/38969?","gravatar_id":"fef48709416e18e4ccb263b248fd88e1","url":"https://api.github.com/users/caridy","html_url":"https://github.com/caridy","followers_url":"https://api.github.com/users/caridy/followers","following_url":"https://api.github.com/users/caridy/following{/other_user}","gists_url":"https://api.github.com/users/caridy/gists{/gist_id}","starred_url":"https://api.github.com/users/caridy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caridy/subscriptions","organizations_url":"https://api.github.com/users/caridy/orgs","repos_url":"https://api.github.com/users/caridy/repos","events_url":"https://api.github.com/users/caridy/events{/privacy}","received_events_url":"https://api.github.com/users/caridy/received_events","type":"User","site_admin":false},"body":"I don't think the `eval()` is really needed here since the content of the script tag will be evaluated anyways under the global scope.","created_at":"2014-05-12T23:41:56Z","updated_at":"2014-05-12T23:41:56Z","html_url":"https://github.com/systemjs/systemjs/pull/89#discussion_r12560181","pull_request_url":"https://api.github.com/repos/systemjs/systemjs/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/systemjs/systemjs/pulls/comments/12560181"},"html":{"href":"https://github.com/systemjs/systemjs/pull/89#discussion_r12560181"},"pull_request":{"href":"https://api.github.com/repos/systemjs/systemjs/pulls/89"}}}}