1 line
18 KiB
Text
1 line
18 KiB
Text
|
{"status":200,"url":"https://api.github.com/repos/electron/electron/commits/2fad53e66b1a2cb6f7dad88fe9bb62d7a461fe98/pulls","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:06 GMT","etag":"W/\"a02a824c8e984accc4fa3c78f76c0ab3\"","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.groot-preview; format=json","x-github-request-id":"C1E2:5089:126DC:28ABA:5ECD4449","x-oauth-scopes":"repo","x-ratelimit-limit":"5000","x-ratelimit-remaining":"4971","x-ratelimit-reset":"1590510696","x-xss-protection":"1; mode=block"},"data":{"url":"https://api.github.com/repos/electron/electron/pulls/20214","id":316715466,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE2NzE1NDY2","html_url":"https://github.com/electron/electron/pull/20214","diff_url":"https://github.com/electron/electron/pull/20214.diff","patch_url":"https://github.com/electron/electron/pull/20214.patch","issue_url":"https://api.github.com/repos/electron/electron/issues/20214","number":20214,"state":"closed","locked":false,"title":"refactor: use v8 serialization for ipc","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},"body":"#### Description of Change\r\n\r\nBREAKING CHANGE\r\n\r\nThis changes IPC communication to use v8's [Structured Clone](https://html.spec.whatwg.org/multipage/structured-data.html#safe-passing-of-structured-data) algorithm instead of using the `base::Value` serialization defined in `native_mate_converters/v8_value_converter.cc`. This is be faster, more featureful, and less surprising than the existing logic, since it more-or-less matches the logic that backs `postMessage`.\r\n\r\nThis brings about a 2x performance boost for large buffers and complex objects. Latency for small messages is not significantly affected.\r\n\r\nUser-observable differences from the existing IPC API:\r\n- It's about 2x faster.\r\n- `NaN`, `Infinity`, and `undefined` are transferred as such, rather than being converted to `null`.\r\n- Cyclic objects can be transmitted.\r\n- `Set` and `Map`, `Error`, `RegExp`, `Date` and `BigInt` can be transmitted.\r\n- `Buffer` will be converted to `Uint8Array`.\r\n- Typed arrays (`Float32Array` and friends) will be transmitted as they are, instead of being converted to `Buffer`.\r\n- Sparse arrays will be transferred as sparse arrays, instead of being converted to dense arrays with `null`s.\r\n\r\n> **NOTE**: Objects that aren't serializable with V8's Structured Clone algorithm, s
|