{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react/pulls/comments/53364697","id":53364697,"diff_hunk":"@@ -0,0 +1,31 @@\n+/**\n+ * Copyright 2013-present, Facebook, Inc.\n+ * All rights reserved.\n+ *\n+ * This source code is licensed under the BSD-style license found in the\n+ * LICENSE file in the root directory of this source tree. An additional grant\n+ * of patent rights can be found in the PATENTS file in the same directory.\n+ *\n+ * @providesModule createMicrosoftUnsafeLocalFunction\n+ */\n+\n+/* globals MSApp */\n+\n+'use strict';\n+\n+/**\n+ * Create a function which has 'unsafe' privileges (required by windows8 apps)\n+ */\n+var createMicrosoftUnsafeLocalFunction = function(func) {\n+  if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n+    return function(arg0, arg1, arg2, arg3) {\n+      MSApp.execUnsafeLocalFunction(function() {\n+        return func(arg0, arg1, arg2, arg3);","path":"src/renderers/dom/client/utils/createMicrosoftUnsafeLocalFunction.js","position":23,"original_position":23,"commit_id":"51d16473b0d583ec5a5ab0e5ec5da2b032cf4029","original_commit_id":"51d16473b0d583ec5a5ab0e5ec5da2b032cf4029","user":{"login":"zpao","id":8445,"avatar_url":"https://avatars.githubusercontent.com/u/8445?v=3","gravatar_id":"","url":"https://api.github.com/users/zpao","html_url":"https://github.com/zpao","followers_url":"https://api.github.com/users/zpao/followers","following_url":"https://api.github.com/users/zpao/following{/other_user}","gists_url":"https://api.github.com/users/zpao/gists{/gist_id}","starred_url":"https://api.github.com/users/zpao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpao/subscriptions","organizations_url":"https://api.github.com/users/zpao/orgs","repos_url":"https://api.github.com/users/zpao/repos","events_url":"https://api.github.com/users/zpao/events{/privacy}","received_events_url":"https://api.github.com/users/zpao/received_events","type":"User","site_admin":false},"body":"Even better because rest & call spread:\r\n```js\r\nreturn function(...args) {\r\n  MSApp.execUnsafeLocalFunction(function() {\r\n    return func(...args);\r\n  });\r\n}\r\n```\r\n\r\nBut it'll compile to arrays and apply until that's all supported. And we've mostly opted not to use those features (except in some dev-only code) and just explicitly list out the max number of args we need (see PooledClass creators).","created_at":"2016-02-18T19:06:01Z","updated_at":"2016-02-18T19:06:01Z","html_url":"https://github.com/facebook/react/pull/6064#discussion_r53364697","pull_request_url":"https://api.github.com/repos/facebook/react/pulls/6064","_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/comments/53364697"},"html":{"href":"https://github.com/facebook/react/pull/6064#discussion_r53364697"},"pull_request":{"href":"https://api.github.com/repos/facebook/react/pulls/6064"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/6064","id":59751844,"html_url":"https://github.com/facebook/react/pull/6064","diff_url":"https://github.com/facebook/react/pull/6064.diff","patch_url":"https://github.com/facebook/react/pull/6064.patch","issue_url":"https://api.github.com/repos/facebook/react/issues/6064","number":6064,"state":"open","locked":false,"title":"Create ms-unsafe functions in one place, simplifies code.","user":{"login":"jimfb","id":9595985,"avatar_url":"https://avatars.githubusercontent.com/u/9595985?v=3","gravatar_id":"","url":"https://api.github.com/users/jimfb","html_url":"https://github.com/jimfb","followers_url":"https://api.github.com/users/jimfb/followers","following_url":"https://api.github.com/users/jimfb/following{/other_user}","gists_url":"https://api.github.com/users/jimfb/gists{/gist_id}","starred_url":"https://api.github.com/users/jimfb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimfb/subscriptions","organizations_url":"https://api.github.com/users/jimfb/orgs","repos_url":"https://api.github.com/users/jimfb/repos","events_url":"https://api.github.com/users/jimfb/events{/privacy}","received_events_url":"https://api.github.com/users/jimfb/received_events","type":"User","site_admin":false},"body":"Create ms-unsafe functions in one place, simplifies code.\n","created_at":"2016-02-18T05:10:49Z","updated_at":"2016-02-18T19:06:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7fc390329aaf1c75759ef89ac685d98f9c0bd628","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react/pulls/6064/commits","review_comments_url":"https://api.github.com/repos/facebook/react/pulls/6064/comments","review_comment_url":"https://api.github.com/repos/facebook/react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react/issues/6064/comments","statuses_url":"https://api.github.com/repos/facebook/react/statuses/51d16473b0d583ec5a5ab0e5ec5da2b032cf4029","head":{"label":"jimfb:provide-msunsafe-wrapper","ref":"provide-msunsafe-wrapper","sha":"51d16473b0d583ec5a5ab0e5ec5da2b032cf4029","user":{"login":"jimfb","id":9595985,"avatar_url":"https://avatars.githubusercontent.com/u/9595985?v=3","gravatar_id":"","url":"https://api.github.com/users/jimfb","html_url":"https://github.com/jimfb","followers_url":"https://api.github.com/users/jimfb/followers","following_url":"https://api.github.com/users/jimfb/following{/other_user}","gists_url":"https://api.github.com/users/jimfb/gists{/gist_id}","starred_url":"https://api.github.com/users/jimfb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimfb/subscriptions","organizations_url":"https://api.github.com/users/jimfb/orgs","repos_url":"https://api.github.com/users/jimfb/repos","events_url":"https://api.github.com/users/jimfb/events{/privacy}","received_events_url":"https://api.github.com/users/jimfb/received_events","type":"User","site_admin":false},"repo":{"id":26285889,"name":"react","full_name":"jimfb/react","owner":{"login":"jimfb","id":9595985,"avatar_url":"https://avatars.githubusercontent.com/u/9595985?v=3","gravatar_id":"","url":"https://api.github.com/users/jimfb","html_url":"https://github.com/jimfb","followers_url":"https://api.github.com/users/jimfb/followers","following_url":"https://api.github.com/users/jimfb/following{/other_user}","gists_url":"https://api.github.com/users/jimfb/gists{/gist_id}","starred_url":"https://api.github.com/users/jimfb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimfb/subscriptions","organizations_url":"https://api.github.com/users/jimfb/orgs","repos_url":"https://api.github.com/users/jimfb/repos","events_url":"https://api.github.com/users/jimfb/events{/privacy}","received_events_url":"https://api.github.com/users/jimfb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimfb/react","description":"React is a declarative, efficient, and extremely flexible JavaScript library for building user interfaces.","fork":true,"url":"https://api.github.com/repos/jimfb/react","forks_url":"https://api.github.com/repos/jimfb/react/forks","keys_url":"https://api.github.com/repos/jimfb/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimfb/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimfb/react/teams","hooks_url":"https://api.github.com/repos/jimfb/react/hooks","issue_events_url":"https://api.github.com/repos/jimfb/react/issues/events{/number}","events_url":"https://api.github.com/repos/jimfb/react/events","assignees_url":"https://api.github.com/repos/jimfb/react/assignees{/user}","branches_url":"https://api.github.com/repos/jimfb/react/branches{/branch}","tags_url":"https://api.github.com/repos/jimfb/react/tags","blobs_url":"https://api.github.com/repos/jimfb/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimfb/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimfb/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimfb/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimfb/react/statuses/{sha}","languages_url":"https://api.github.com/repos/jimfb/react/languages","stargazers_url":"https://api.github.com/repos/jimfb/react/stargazers","contributors_url":"https://api.github.com/repos/jimfb/react/contributors","subscribers_url":"https://api.github.com/repos/jimfb/react/subscribers","subscription_url":"https://api.github.com/repos/jimfb/react/subscription","commits_url":"https://api.github.com/repos/jimfb/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimfb/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimfb/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimfb/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimfb/react/contents/{+path}","compare_url":"https://api.github.com/repos/jimfb/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimfb/react/merges","archive_url":"https://api.github.com/repos/jimfb/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimfb/react/downloads","issues_url":"https://api.github.com/repos/jimfb/react/issues{/number}","pulls_url":"https://api.github.com/repos/jimfb/react/pulls{/number}","milestones_url":"https://api.github.com/repos/jimfb/react/milestones{/number}","notifications_url":"https://api.github.com/repos/jimfb/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimfb/react/labels{/name}","releases_url":"https://api.github.com/repos/jimfb/react/releases{/id}","deployments_url":"https://api.github.com/repos/jimfb/react/deployments","created_at":"2014-11-06T19:24:05Z","updated_at":"2015-08-03T01:13:28Z","pushed_at":"2016-02-18T05:10:36Z","git_url":"git://github.com/jimfb/react.git","ssh_url":"git@github.com:jimfb/react.git","clone_url":"https://github.com/jimfb/react.git","svn_url":"https://github.com/jimfb/react","homepage":"http://facebook.github.io/react/","size":70522,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"5879c9e1a4e42136fd56e5b528655854260e25a6","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":10270250,"name":"react","full_name":"facebook/react","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":false,"url":"https://api.github.com/repos/facebook/react","forks_url":"https://api.github.com/repos/facebook/react/forks","keys_url":"https://api.github.com/repos/facebook/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react/teams","hooks_url":"https://api.github.com/repos/facebook/react/hooks","issue_events_url":"https://api.github.com/repos/facebook/react/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react/events","assignees_url":"https://api.github.com/repos/facebook/react/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react/tags","blobs_url":"https://api.github.com/repos/facebook/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react/languages","stargazers_url":"https://api.github.com/repos/facebook/react/stargazers","contributors_url":"https://api.github.com/repos/facebook/react/contributors","subscribers_url":"https://api.github.com/repos/facebook/react/subscribers","subscription_url":"https://api.github.com/repos/facebook/react/subscription","commits_url":"https://api.github.com/repos/facebook/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react/merges","archive_url":"https://api.github.com/repos/facebook/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react/downloads","issues_url":"https://api.github.com/repos/facebook/react/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react/deployments","created_at":"2013-05-24T16:15:54Z","updated_at":"2016-02-18T19:05:36Z","pushed_at":"2016-02-18T18:46:53Z","git_url":"git://github.com/facebook/react.git","ssh_url":"git@github.com:facebook/react.git","clone_url":"https://github.com/facebook/react.git","svn_url":"https://github.com/facebook/react","homepage":"https://facebook.github.io/react/","size":95788,"stargazers_count":36506,"watchers_count":36506,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5992,"mirror_url":null,"open_issues_count":539,"forks":5992,"open_issues":539,"watchers":36506,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/6064"},"html":{"href":"https://github.com/facebook/react/pull/6064"},"issue":{"href":"https://api.github.com/repos/facebook/react/issues/6064"},"comments":{"href":"https://api.github.com/repos/facebook/react/issues/6064/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react/pulls/6064/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react/pulls/6064/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react/statuses/51d16473b0d583ec5a5ab0e5ec5da2b032cf4029"}}}}