{"status":200,"url":"https://api.github.com/repos/electron/electron/issues/20214/comments?per_page=100","headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset","cache-control":"private, max-age=60, s-maxage=60","connection":"close","content-encoding":"gzip","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Tue, 26 May 2020 16:31:14 GMT","etag":"W/\"3a1b7642c1edb42f6a13611136ff55a5\"","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"GitHub.com","status":"200 OK","strict-transport-security":"max-age=31536000; includeSubdomains; preload","transfer-encoding":"chunked","vary":"Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With","x-accepted-oauth-scopes":"","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-media-type":"github.v3; format=json","x-github-request-id":"C1E4:508A:20B53:39898:5ECD444B","x-oauth-scopes":"repo","x-ratelimit-limit":"5000","x-ratelimit-remaining":"4970","x-ratelimit-reset":"1590510696","x-xss-protection":"1; mode=block"},"data":[{"url":"https://api.github.com/repos/electron/electron/issues/comments/530855479","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-530855479","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":530855479,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMDg1NTQ3OQ==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-12T14:35:55Z","updated_at":"2019-09-12T14:35:55Z","author_association":"MEMBER","body":"I did some preliminary performance testing. The numbers below are the average time taken, in milliseconds, to send a Uint8Array buffer of a given size, across 200 calls to `send()`.\r\n\r\nWith the existing mojo-based `base::Value` serialization:\r\n```\r\n200 x 2k: 0.42\r\n200 x 4k: 0.60\r\n200 x 8k: 0.93\r\n200 x 16k: 1.61\r\n200 x 32k: 2.88\r\n200 x 64k: 5.50\r\n200 x 128k: 10.74\r\n200 x 256k: 21.07\r\n200 x 512k: 42.62\r\n```\r\n\r\nWith this PR, using v8's ValueSerializer:\r\n```\r\n200 x 2k: 0.44\r\n200 x 4k: 0.55\r\n200 x 8k: 0.76\r\n200 x 16k: 1.08\r\n200 x 32k: 1.90\r\n200 x 64k: 3.44\r\n200 x 128k: 6.53\r\n200 x 256k: 12.59\r\n200 x 512k: 23.99\r\n```\r\n\r\n\r\nSo this seems to be a little less than twice as fast for this use case."},{"url":"https://api.github.com/repos/electron/electron/issues/comments/530916907","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-530916907","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":530916907,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMDkxNjkwNw==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-12T17:05:11Z","updated_at":"2019-09-12T17:05:11Z","author_association":"MEMBER","body":"Ref https://github.com/electron/electron/issues/18758"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/530917146","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-530917146","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":530917146,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMDkxNzE0Ng==","user":{"login":"jkleinsc","id":609052,"node_id":"MDQ6VXNlcjYwOTA1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/609052?v=4","gravatar_id":"","url":"https://api.github.com/users/jkleinsc","html_url":"https://github.com/jkleinsc","followers_url":"https://api.github.com/users/jkleinsc/followers","following_url":"https://api.github.com/users/jkleinsc/following{/other_user}","gists_url":"https://api.github.com/users/jkleinsc/gists{/gist_id}","starred_url":"https://api.github.com/users/jkleinsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkleinsc/subscriptions","organizations_url":"https://api.github.com/users/jkleinsc/orgs","repos_url":"https://api.github.com/users/jkleinsc/repos","events_url":"https://api.github.com/users/jkleinsc/events{/privacy}","received_events_url":"https://api.github.com/users/jkleinsc/received_events","type":"User","site_admin":true},"created_at":"2019-09-12T17:05:48Z","updated_at":"2019-09-12T17:05:48Z","author_association":"MEMBER","body":"Could we possibly support both the existing serialization and the sca approach at the same time? I'm wondering if we can follow a deprecation path here or if this will have to be all or nothing."},{"url":"https://api.github.com/repos/electron/electron/issues/comments/530925525","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-530925525","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":530925525,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMDkyNTUyNQ==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-12T17:27:54Z","updated_at":"2019-09-12T17:27:54Z","author_association":"MEMBER","body":"Tried this with some larger buffers:\r\n\r\nBefore:\r\n```\r\n10 x 1024k: 93.44\r\n10 x 2048k: 183.62\r\n10 x 4096k: 352.30\r\n10 x 8192k: 727.64\r\n10 x 16384k: 1443.97\r\n10 x 32768k: 2845.11\r\n10 x 65536k: 5565.72\r\n---crashed with buffers of size 128M---\r\n```\r\n\r\nafter:\r\n```\r\n10 x 1024k: 69.51\r\n10 x 2048k: 100.01\r\n10 x 4096k: 194.63\r\n10 x 8192k: 386.91\r\n10 x 16384k: 774.37\r\n10 x 32768k: 1606.11\r\n10 x 65536k: 3262.18\r\n10 x 131072k: 6703.16\r\n10 x 262144k: 13136.74\r\n```"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/530981366","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-530981366","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":530981366,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMDk4MTM2Ng==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-12T19:57:09Z","updated_at":"2019-09-12T19:57:09Z","author_association":"MEMBER","body":"@jkleinsc I'd like to first try to find a way we can make this at least _more_ compatible with the existing structure, if not 1:1. If we can find a way that works for 99% of use cases, then I think we should cut over directly and accept the breakage. If we find fundamental issues that are not paper-over-able, then we should investigate ways we can expose this functionality differently (perhaps a new set of APIs like `ipcRenderer.post()`, or perhaps a deprecation cycle of some sort)."},{"url":"https://api.github.com/repos/electron/electron/issues/comments/531005426","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-531005426","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":531005426,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMTAwNTQyNg==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-12T21:02:15Z","updated_at":"2019-09-12T21:02:15Z","author_association":"MEMBER","body":"I also tried this with complex objects. The numbers below are for NxM objects, where N is the breadth and M is the depth. For example, a 2x3 object is:\r\n```\r\n{'key-0': {'key-0': {'key-0': {'key-0': {}, 'key-1': {}}, 'key-1': {'key-0': {}, 'key-1': {}}}, 'key-1': {'key-0': {'key-0': {}, 'key-1': {}}, 'key-1': {'key-0': {}, 'key-1': {}}}}, 'key-1': {'key-0': {'key-0': {'key-0': {}, 'key-1': {}}, 'key-1': {'key-0': {}, 'key-1': {}}}, 'key-1': {'key-0': {'key-0': {}, 'key-1': {}}, 'key-1': {'key-0': {}, 'key-1': {}}}}}\r\n```\r\n\r\nA NaN represents a renderer crash.\r\n\r\nBefore:\r\n```\r\n10 x 1x1: 3.34\r\n10 x 1x2: 3.34\r\n10 x 1x4: 3.26\r\n10 x 1x8: 3.30\r\n10 x 1x16: 3.35\r\n10 x 2x1: 3.48\r\n10 x 2x2: 3.42\r\n10 x 2x4: 3.77\r\n10 x 2x8: 10.01\r\n10 x 2x16: 1736.84\r\n10 x 4x1: 3.21\r\n10 x 4x2: 3.41\r\n10 x 4x4: 7.92\r\n10 x 4x8: 1142.82\r\n10 x 4x16: NaN\r\n10 x 8x1: 3.52\r\n10 x 8x2: 4.08\r\n10 x 8x4: 64.33\r\n10 x 8x8: NaN\r\n10 x 8x16: NaN\r\n10 x 16x1: 4.52\r\n10 x 16x2: 7.23\r\n10 x 16x4: 1003.91\r\n10 x 16x8: NaN\r\n10 x 16x16: NaN\r\n```\r\nAfter:\r\n```\r\n10 x 1x1: 3.38\r\n10 x 1x2: 4.00\r\n10 x 1x4: 3.37\r\n10 x 1x8: 3.01\r\n10 x 1x16: 3.06\r\n10 x 2x1: 4.38\r\n10 x 2x2: 4.14\r\n10 x 2x4: 3.67\r\n10 x 2x8: 5.41\r\n10 x 2x16: 409.08\r\n10 x 4x1: 3.07\r\n10 x 4x2: 3.65\r\n10 x 4x4: 3.85\r\n10 x 4x8: 234.70\r\n10 x 4x16: NaN\r\n10 x 8x1: 3.51\r\n10 x 8x2: 3.29\r\n10 x 8x4: 15.58\r\n10 x 8x8: 87138.07\r\n10 x 8x16: NaN\r\n10 x 16x1: 3.93\r\n10 x 16x2: 4.05\r\n10 x 16x4: 181.39\r\n10 x 16x8: NaN\r\n10 x 16x16: NaN\r\n```\r\n\r\nSo, quite a bit faster. I think the crashes are when _constructing_ those stupidly large objects, rather than serializing them. And the new code does succeed on the 8x8 case, where the old code crashed."},{"url":"https://api.github.com/repos/electron/electron/issues/comments/533729544","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-533729544","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":533729544,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMzcyOTU0NA==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-20T22:22:22Z","updated_at":"2019-09-25T19:58:17Z","author_association":"MEMBER","body":"Remaining TODOs as of latest commit:\r\n\r\n- [x] Handle errors gracefully & correctly.\r\n- [x] Investigate whether we can discriminate between `Buffer` and `Uint8Array` wisely, and deserialize `Buffer`s as `Buffer`s where we can, and `Uint8Array` where we can't (e.g. in sandboxed renderers).\r\n- [x] Convert the remaining methods to the new serialization algorithm (`webContents.send`, `messageTo`, and `messageHost`).\r\n- [x] Clean up the somewhat hacky delegates in blink_converter.cc"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/534217625","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-534217625","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":534217625,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNDIxNzYyNQ==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-23T18:09:10Z","updated_at":"2019-09-23T18:09:10Z","author_association":"MEMBER","body":"OK, there's a choice to make about how we handle when non-POJO objects are passed to IPC functions (things like DOM objects, `WebContents`, `process.env`, etc.).\r\n\r\n1. Throw an exception.\r\n - This is the safest option, but also the most disruptive. (e.g. many of Electron's internal APIs pass such objects to IPC methods, and will need to be refactored.)\r\n2. JSON.stringify()/JSON.parse() them.\r\n - This is roughly similar to current behavior of the IPC methods, in that it can't handle NaN or Infinity, or cyclic objects. However, it might be somewhat confusing to have some objects work differently based on whether they're referenced from a non-POJO object or not. It's a fairly obscure corner case though, so maybe nobody would notice?\r\n3. Iterate the keys/values of such objects and recurse in the serialization algorithm.\r\n - This gives us cyclic object support and correct handling of Infinity/NaN/etc.\r\n - But most non-trivial non-POJO objects contain unserializable things like functions.\r\n - We can attempt to replace those unserializable things with `undefined`, but it only works one layer deep. i.e. if there's a non-POJO object like `{ fn: () => {} }`, it'll be turned into `{ fn: undefined }`, but if it's like `{ events: { fn: () => {} } }`, then the entire serialization operation must be aborted and an error thrown.\r\n\r\nI'm leaning towards (1), since I don't think it really makes sense to be trying to send `window.location` or a `WebContents` value over IPC, and places where we're doing that are likely error-prone. Thoughts?"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/534692035","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-534692035","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":534692035,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNDY5MjAzNQ==","user":{"login":"MarshallOfSound","id":6634592,"node_id":"MDQ6VXNlcjY2MzQ1OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6634592?v=4","gravatar_id":"","url":"https://api.github.com/users/MarshallOfSound","html_url":"https://github.com/MarshallOfSound","followers_url":"https://api.github.com/users/MarshallOfSound/followers","following_url":"https://api.github.com/users/MarshallOfSound/following{/other_user}","gists_url":"https://api.github.com/users/MarshallOfSound/gists{/gist_id}","starred_url":"https://api.github.com/users/MarshallOfSound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarshallOfSound/subscriptions","organizations_url":"https://api.github.com/users/MarshallOfSound/orgs","repos_url":"https://api.github.com/users/MarshallOfSound/repos","events_url":"https://api.github.com/users/MarshallOfSound/events{/privacy}","received_events_url":"https://api.github.com/users/MarshallOfSound/received_events","type":"User","site_admin":false},"created_at":"2019-09-24T18:37:09Z","updated_at":"2019-09-24T18:37:09Z","author_association":"MEMBER","body":"I don't like the idea of existing code throwing errors in an obscure and un-lintable way. i.e. we can't provide a lint rule or other tool to detect invalid usages of `ipc.send` so folks will only find out at runtime when it's too late and hard to spot.\r\n\r\nI'm leaning towards something equivalent to (2) where if the v8 serializer fails we fall back to the old one. Maybe log a console warning that you tried to send an unserializable object and we fell back to a less accurate converter?"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/534705193","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-534705193","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":534705193,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNDcwNTE5Mw==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-24T19:08:48Z","updated_at":"2019-09-24T19:08:48Z","author_association":"MEMBER","body":"Does that leave any path towards eventually eliminating the old converter? I'm disinclined to leave it there forever... but maybe it would make sense as a less-dramatic deprecation strategy? e.g. \"Looks like you sent a non-standard object over IPC. This is probably not what you intended to do, but we obliged and serialized it anyway. Look out, this will throw an exception in Electron 9.\""},{"url":"https://api.github.com/repos/electron/electron/issues/comments/534740833","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-534740833","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":534740833,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNDc0MDgzMw==","user":{"login":"MarshallOfSound","id":6634592,"node_id":"MDQ6VXNlcjY2MzQ1OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6634592?v=4","gravatar_id":"","url":"https://api.github.com/users/MarshallOfSound","html_url":"https://github.com/MarshallOfSound","followers_url":"https://api.github.com/users/MarshallOfSound/followers","following_url":"https://api.github.com/users/MarshallOfSound/following{/other_user}","gists_url":"https://api.github.com/users/MarshallOfSound/gists{/gist_id}","starred_url":"https://api.github.com/users/MarshallOfSound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarshallOfSound/subscriptions","organizations_url":"https://api.github.com/users/MarshallOfSound/orgs","repos_url":"https://api.github.com/users/MarshallOfSound/repos","events_url":"https://api.github.com/users/MarshallOfSound/events{/privacy}","received_events_url":"https://api.github.com/users/MarshallOfSound/received_events","type":"User","site_admin":false},"created_at":"2019-09-24T20:46:20Z","updated_at":"2019-09-24T20:46:20Z","author_association":"MEMBER","body":"I'd be down for a **very** long term deprecation strategy here. Like we should support serialization for I'd say 4 versions beyond when this lands (number picked to match the number of versions we used for the native module deprecation).\r\n\r\nThe deprecation log should include the object itself as well if possible 🤔 "},{"url":"https://api.github.com/repos/electron/electron/issues/comments/534770157","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-534770157","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":534770157,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNDc3MDE1Nw==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-24T22:15:23Z","updated_at":"2019-09-24T22:18:48Z","author_association":"MEMBER","body":"@MarshallOfSound I'm not sure that's warranted. 99% of cases where IPC is used, the new version should still work fine. Only in weird cases where it only kind of semi-works currently are problematic.\r\n\r\nFor example. The `new-window` event has as one of its arguments the `options` parameter, which is the options passed to `new BrowserWindow()`. One of these options is `webContents`, which specifies which WebContents will go in the new window. For WebViews, the `new-window` event is proxied over to the host frame. However, during that transmission, the `webContents` key stops being an actual `WebContents`. Is anything depending on that key being there in the webview host? I don't think so. Can anything actually useful be done with it there? Again, I don't think so. The fact that it's there is an accident, and it never really performed any kind of useful function.\r\n\r\nAlso, it's trivial to get something close to the old behavior with the transformation `x => JSON.parse(JSON.stringify(x))`, as long as `x` isn't cyclic (but if it was, the cyclic bit is getting `null`ed out currently anyway).\r\n\r\n**tldr** most people wouldn't need to fix anything if this sort of usage started throwing an error, and for those that do, the fix is easy."},{"url":"https://api.github.com/repos/electron/electron/issues/comments/534778673","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-534778673","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":534778673,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNDc3ODY3Mw==","user":{"login":"MarshallOfSound","id":6634592,"node_id":"MDQ6VXNlcjY2MzQ1OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/6634592?v=4","gravatar_id":"","url":"https://api.github.com/users/MarshallOfSound","html_url":"https://github.com/MarshallOfSound","followers_url":"https://api.github.com/users/MarshallOfSound/followers","following_url":"https://api.github.com/users/MarshallOfSound/following{/other_user}","gists_url":"https://api.github.com/users/MarshallOfSound/gists{/gist_id}","starred_url":"https://api.github.com/users/MarshallOfSound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarshallOfSound/subscriptions","organizations_url":"https://api.github.com/users/MarshallOfSound/orgs","repos_url":"https://api.github.com/users/MarshallOfSound/repos","events_url":"https://api.github.com/users/MarshallOfSound/events{/privacy}","received_events_url":"https://api.github.com/users/MarshallOfSound/received_events","type":"User","site_admin":false},"created_at":"2019-09-24T22:52:11Z","updated_at":"2019-09-24T22:52:11Z","author_association":"MEMBER","body":"> if this sort of usage started throwing an error\r\n\r\nMy only concern here was that you can't glance at a bit of code and say \"that's gonna cause a problem\". In fact I don't think you could describe the kinds of things that would cause this problem very easily at all. That's the only reason I'm advocating for a deprecation cycle, it will take time for people to find all the edge cases in their app that might do this. Maybe 4 versions was a bit over-eager 🤷‍♂But it should definitely go through a cycle where the old code still works but tells you you're doing something bad."},{"url":"https://api.github.com/repos/electron/electron/issues/comments/535169992","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-535169992","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":535169992,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNTE2OTk5Mg==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-25T19:14:29Z","updated_at":"2019-09-25T19:14:29Z","author_association":"MEMBER","body":"The things which will throw exceptions with structured clone that don't with base::Value serialization:\r\n- DOM objects (`Element`, `Location`, etc.)\r\n- special Node objects like `process.env` or http internals\r\n- special Electron API objects like WebContents\r\n- functions\r\n\r\nI've updated the PR to fall back to the base::Value-based serialization if structured clone fails, and emit a deprecation warning."},{"url":"https://api.github.com/repos/electron/electron/issues/comments/535186584","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-535186584","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":535186584,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNTE4NjU4NA==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-25T19:57:30Z","updated_at":"2019-09-25T19:57:30Z","author_association":"MEMBER","body":"The last remaining tricky thing is that sending a `Buffer` will result in the other side receiving a `Uint8Array`. Without patching V8, I don't see a good way to get around this. Fortunately, you can wrap a `Buffer` around a `Uint8Array` quite easily:\r\n\r\n```\r\nconst uint8Array = await ipcRenderer.invoke('return-a-buffer')\r\nconst buf = Buffer.from(uint8Array.buffer)\r\n```"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/535187110","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-535187110","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":535187110,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNTE4NzExMA==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-09-25T19:58:39Z","updated_at":"2019-09-25T19:58:39Z","author_association":"MEMBER","body":"Taking off the [wip] as I believe this is ready for full review."},{"url":"https://api.github.com/repos/electron/electron/issues/comments/538499039","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-538499039","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":538499039,"node_id":"MDEyOklzc3VlQ29tbWVudDUzODQ5OTAzOQ==","user":{"login":"miniak","id":1281234,"node_id":"MDQ6VXNlcjEyODEyMzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1281234?v=4","gravatar_id":"","url":"https://api.github.com/users/miniak","html_url":"https://github.com/miniak","followers_url":"https://api.github.com/users/miniak/followers","following_url":"https://api.github.com/users/miniak/following{/other_user}","gists_url":"https://api.github.com/users/miniak/gists{/gist_id}","starred_url":"https://api.github.com/users/miniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miniak/subscriptions","organizations_url":"https://api.github.com/users/miniak/orgs","repos_url":"https://api.github.com/users/miniak/repos","events_url":"https://api.github.com/users/miniak/events{/privacy}","received_events_url":"https://api.github.com/users/miniak/received_events","type":"User","site_admin":false},"created_at":"2019-10-04T17:54:45Z","updated_at":"2019-10-04T17:55:03Z","author_association":"MEMBER","body":"this will allow us to simplify the serialization in the `remote` module. #20427"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/540117270","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-540117270","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":540117270,"node_id":"MDEyOklzc3VlQ29tbWVudDU0MDExNzI3MA==","user":{"login":"release-clerk[bot]","id":42386326,"node_id":"MDM6Qm90NDIzODYzMjY=","avatar_url":"https://avatars0.githubusercontent.com/in/16104?v=4","gravatar_id":"","url":"https://api.github.com/users/release-clerk%5Bbot%5D","html_url":"https://github.com/apps/release-clerk","followers_url":"https://api.github.com/users/release-clerk%5Bbot%5D/followers","following_url":"https://api.github.com/users/release-clerk%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/release-clerk%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/release-clerk%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/release-clerk%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/release-clerk%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/release-clerk%5Bbot%5D/repos","events_url":"https://api.github.com/users/release-clerk%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/release-clerk%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2019-10-09T17:59:11Z","updated_at":"2019-10-09T17:59:11Z","author_association":"NONE","body":"**Release Notes Persisted**\n\n> IPC between main and renderer processes now uses the Structured Clone Algorithm."},{"url":"https://api.github.com/repos/electron/electron/issues/comments/540619766","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-540619766","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":540619766,"node_id":"MDEyOklzc3VlQ29tbWVudDU0MDYxOTc2Ng==","user":{"login":"Xylobol","id":40412285,"node_id":"MDQ6VXNlcjQwNDEyMjg1","avatar_url":"https://avatars3.githubusercontent.com/u/40412285?v=4","gravatar_id":"","url":"https://api.github.com/users/Xylobol","html_url":"https://github.com/Xylobol","followers_url":"https://api.github.com/users/Xylobol/followers","following_url":"https://api.github.com/users/Xylobol/following{/other_user}","gists_url":"https://api.github.com/users/Xylobol/gists{/gist_id}","starred_url":"https://api.github.com/users/Xylobol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xylobol/subscriptions","organizations_url":"https://api.github.com/users/Xylobol/orgs","repos_url":"https://api.github.com/users/Xylobol/repos","events_url":"https://api.github.com/users/Xylobol/events{/privacy}","received_events_url":"https://api.github.com/users/Xylobol/received_events","type":"User","site_admin":false},"created_at":"2019-10-10T14:40:42Z","updated_at":"2019-10-10T14:40:42Z","author_association":"NONE","body":"For anyone else interested, these changes have landed in nightly - https://github.com/electron/nightlies/releases/tag/v8.0.0-nightly.20191009"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/545339910","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-545339910","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":545339910,"node_id":"MDEyOklzc3VlQ29tbWVudDU0NTMzOTkxMA==","user":{"login":"gdavidkov","id":5815794,"node_id":"MDQ6VXNlcjU4MTU3OTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5815794?v=4","gravatar_id":"","url":"https://api.github.com/users/gdavidkov","html_url":"https://github.com/gdavidkov","followers_url":"https://api.github.com/users/gdavidkov/followers","following_url":"https://api.github.com/users/gdavidkov/following{/other_user}","gists_url":"https://api.github.com/users/gdavidkov/gists{/gist_id}","starred_url":"https://api.github.com/users/gdavidkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdavidkov/subscriptions","organizations_url":"https://api.github.com/users/gdavidkov/orgs","repos_url":"https://api.github.com/users/gdavidkov/repos","events_url":"https://api.github.com/users/gdavidkov/events{/privacy}","received_events_url":"https://api.github.com/users/gdavidkov/received_events","type":"User","site_admin":false},"created_at":"2019-10-23T08:50:33Z","updated_at":"2019-10-23T08:50:33Z","author_association":"NONE","body":"Will this be backported to 6.x?"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/545494783","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-545494783","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":545494783,"node_id":"MDEyOklzc3VlQ29tbWVudDU0NTQ5NDc4Mw==","user":{"login":"nornagon","id":172800,"node_id":"MDQ6VXNlcjE3MjgwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/172800?v=4","gravatar_id":"","url":"https://api.github.com/users/nornagon","html_url":"https://github.com/nornagon","followers_url":"https://api.github.com/users/nornagon/followers","following_url":"https://api.github.com/users/nornagon/following{/other_user}","gists_url":"https://api.github.com/users/nornagon/gists{/gist_id}","starred_url":"https://api.github.com/users/nornagon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nornagon/subscriptions","organizations_url":"https://api.github.com/users/nornagon/orgs","repos_url":"https://api.github.com/users/nornagon/repos","events_url":"https://api.github.com/users/nornagon/events{/privacy}","received_events_url":"https://api.github.com/users/nornagon/received_events","type":"User","site_admin":false},"created_at":"2019-10-23T15:17:41Z","updated_at":"2019-10-23T15:17:41Z","author_association":"MEMBER","body":"No, since it is a breaking change.\n"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/612301761","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-612301761","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":612301761,"node_id":"MDEyOklzc3VlQ29tbWVudDYxMjMwMTc2MQ==","user":{"login":"Slapbox","id":6835891,"node_id":"MDQ6VXNlcjY4MzU4OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/6835891?v=4","gravatar_id":"","url":"https://api.github.com/users/Slapbox","html_url":"https://github.com/Slapbox","followers_url":"https://api.github.com/users/Slapbox/followers","following_url":"https://api.github.com/users/Slapbox/following{/other_user}","gists_url":"https://api.github.com/users/Slapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/Slapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slapbox/subscriptions","organizations_url":"https://api.github.com/users/Slapbox/orgs","repos_url":"https://api.github.com/users/Slapbox/repos","events_url":"https://api.github.com/users/Slapbox/events{/privacy}","received_events_url":"https://api.github.com/users/Slapbox/received_events","type":"User","site_admin":false},"created_at":"2020-04-11T02:28:50Z","updated_at":"2020-04-11T02:28:50Z","author_association":"CONTRIBUTOR","body":"This PR is noted as a **_Breaking Changes_** for Electron 8.0.0 & 9.0.0 betas. Is there any difference in the IPC between versions 8 and 9?"},{"url":"https://api.github.com/repos/electron/electron/issues/comments/612959454","html_url":"https://github.com/electron/electron/pull/20214#issuecomment-612959454","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","id":612959454,"node_id":"MDEyOklzc3VlQ29tbWVudDYxMjk1OTQ1NA==","user":{"login":"pushkin-","id":6374473,"node_id":"MDQ6VXNlcjYzNzQ0NzM=","avatar_url":"https://avatars3.githubusercontent.com/u/6374473?v=4","gravatar_id":"","url":"https://api.github.com/users/pushkin-","html_url":"https://github.com/pushkin-","followers_url":"https://api.github.com/users/pushkin-/followers","following_url":"https://api.github.com/users/pushkin-/following{/other_user}","gists_url":"https://api.github.com/users/pushkin-/gists{/gist_id}","starred_url":"https://api.github.com/users/pushkin-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pushkin-/subscriptions","organizations_url":"https://api.github.com/users/pushkin-/orgs","repos_url":"https://api.github.com/users/pushkin-/repos","events_url":"https://api.github.com/users/pushkin-/events{/privacy}","received_events_url":"https://api.github.com/users/pushkin-/received_events","type":"User","site_admin":false},"created_at":"2020-04-13T15:54:22Z","updated_at":"2020-04-13T15:54:22Z","author_association":"NONE","body":"@Slapbox I believe the plan in 8 is to use the new algorithm, but if it fails, emit a warning and fallback to the old algorithm.\r\n\r\nIn Electron 9, they're going remove the fallback and warning and serializing bad data will start throwing exceptions."}]}