{"action":"created","issue":{"url":"https://api.github.com/repos/feross/buffer/issues/148","repository_url":"https://api.github.com/repos/feross/buffer","labels_url":"https://api.github.com/repos/feross/buffer/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/feross/buffer/issues/148/comments","events_url":"https://api.github.com/repos/feross/buffer/issues/148/events","html_url":"https://github.com/feross/buffer/pull/148","id":187007684,"number":148,"title":"adventure-yunfei fix: wrong overwritting of not writable Unit8Array.from","user":{"login":"adventure-yunfei","id":12392344,"avatar_url":"https://avatars.githubusercontent.com/u/12392344?v=3","gravatar_id":"","url":"https://api.github.com/users/adventure-yunfei","html_url":"https://github.com/adventure-yunfei","followers_url":"https://api.github.com/users/adventure-yunfei/followers","following_url":"https://api.github.com/users/adventure-yunfei/following{/other_user}","gists_url":"https://api.github.com/users/adventure-yunfei/gists{/gist_id}","starred_url":"https://api.github.com/users/adventure-yunfei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adventure-yunfei/subscriptions","organizations_url":"https://api.github.com/users/adventure-yunfei/orgs","repos_url":"https://api.github.com/users/adventure-yunfei/repos","events_url":"https://api.github.com/users/adventure-yunfei/events{/privacy}","received_events_url":"https://api.github.com/users/adventure-yunfei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-03T09:15:24Z","updated_at":"2016-12-02T22:57:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/feross/buffer/pulls/148","html_url":"https://github.com/feross/buffer/pull/148","diff_url":"https://github.com/feross/buffer/pull/148.diff","patch_url":"https://github.com/feross/buffer/pull/148.patch"},"body":"`Uint8Array` defined an unwritable `from` property, which causes overwritting operation after changing `Buffer.__proto__` fails and break script execution.\r\n\r\ne.g. failing to assign \".from\" property in **Chrome**:\r\n![image](https://cloud.githubusercontent.com/assets/12392344/19960585/c127afcc-a1e8-11e6-8c66-33c1e3e2ff46.png)\r\n\r\nWhen use `buffer` with webpack, everything after `Buffer.from = ...` just gone.\r\n\r\nAnd e.g. failing to require `buffer` in **node@4**\r\n![image](https://cloud.githubusercontent.com/assets/12392344/19960464/ec8ecebc-a1e7-11e6-8d31-d5d746a3fa06.png)\r\n\r\nWe should move \"Buffer.from\" assignment forward to avoid this error.\r\n\r\nNote that this may not be reproducible on all browser. In some browsers (or node@6) `Uint8Array` doesn't have 'from', or defines a writable 'from' property."},"comment":{"url":"https://api.github.com/repos/feross/buffer/issues/comments/264585058","html_url":"https://github.com/feross/buffer/pull/148#issuecomment-264585058","issue_url":"https://api.github.com/repos/feross/buffer/issues/148","id":264585058,"user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T22:57:07Z","updated_at":"2016-12-02T22:57:07Z","body":"I suppose this can't do any harm, so why not?"}}
{"actor":{"display_login":"feross"}}