-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport to v1.x #1736
Backport to v1.x #1736
Conversation
When buffer list less than 2, no need to calculate the length. The change's benchmark result is here: https://gist.github.com/JacksonTian/2c9e2bdec00018e010e6 It improve 15% ~ 25% speed when list only have one buffer, to other cases no effect. PR-URL: nodejs#1437 Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Brendan Ashworth <[email protected]>
The NODE_DEPRECATED macro was piggybacking on the V8_DEPRECATED macro but that macro is silent unless V8_DEPRECATION_WARNINGS is defined, something io.js doesn't do. Ergo, no deprecation notices were being issued. PR-URL: nodejs#1565 Reviewed-By: Trevor Norris <[email protected]>
The previous commit enables deprecation warnings, this commit fixes the handful of offending sites where the isolate was not explicitly being passed around. PR-URL: nodejs#1565 Reviewed-By: Trevor Norris <[email protected]>
Calling ./configure --xcode creates xcode projects and a workspace for io.js. PR-URL: nodejs#1562 Reviewed-By: Vladimir Kurchatkin <[email protected]> Reviewed-By: Chris Dickinson <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Minor edits to current build flags and its help texts as well as grouping shared and i18n options into separate option groups. Also, validate i18n default/logic similar to how we treat other options. `--download` isn't really intl-specific but is only used for that purpose which is why it's grouped similarly. PR-URL: nodejs#1533 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Steven R. Loomis <[email protected]>
PR-URL: nodejs#1680 Reviewed-By: Rod Vagg <[email protected]>
Dispatch requests in the implementation of the stream, not in the code creating these requests. The requests might be piled up and invoked internally in the implementation, so it should know better when it is the time to dispatch them. In fact, TLS was doing exactly this thing which led us to... Fix: nodejs#1512 PR-URL: nodejs#1563 Reviewed-By: Shigeki Ohtsu <[email protected]>
Do not enable ClientHello parser for async SNI/OCSP. Use new OpenSSL-1.0.2's API `SSL_set_cert_cb` to pause the handshake process and load the cert/OCSP response asynchronously. Hopefuly this will make whole async SNI/OCSP process much faster and will eventually let us remove the ClientHello parser itself (which is currently used only for async session, see nodejs#1462 for the discussion of removing it). NOTE: Ported our code to `SSL_CTX_add1_chain_cert` to use `SSL_CTX_get0_chain_certs` in `CertCbDone`. Test provided for this feature. Fix: nodejs#1423 PR-URL: nodejs#1464 Reviewed-By: Shigeki Ohtsu <[email protected]>
This commit uses separate functions to isolate deopts caused by try-catches and avoids fn.apply() for callbacks with small numbers of arguments. These changes improve performance by ~1-40% in the various nextTick benchmarks. PR-URL: nodejs#1571 Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Chris Dickinson <[email protected]>
`StreamBase::AfterWrite` is passing handle as an argument to the `afterWrite` function in net.js. Thus GC should not collect the handle and the request separately and assume that they are tied together. With this commit - request will always outlive the StreamBase instance, helping us survive the GC pass. Same applies to the ShutdownWrap instances, they should never be collected after the StreamBase instance. Fix: nodejs#1580 PR-URL: nodejs#1590 Reviewed-By: Ben Noordhuis <[email protected]>
This makes `TLSWrap` and `SecureContext` objects collectable by the incremental gc. `res = null` destroys the cyclic reference in the `reading` property. `this.ssl = null` removes the remaining reference to the `TLSWrap`. `this.ssl._secureContext.context = null` removes the reference to the `SecureContext` object, even though there might be references to `this.ssl._secureContext` somewhere. The `reading` property will now throw an error if accessed after the socket is closed, but that should not happen. PR-URL: nodejs#1580 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Shigeki Ohtsu <[email protected]>
Fix the following (non-serious) compiler warning: ../src/node_http_parser.cc:558:1: warning: missing initializer for member 'http_parser_settings::on_chunk_header' [-Wmissing-field-initializers] }; ^ ../src/node_http_parser.cc:558:1: warning: missing initializer for member 'http_parser_settings::on_chunk_complete' [-Wmissing-field-initializers] Introduced in commit b3a7da1 ("deps: update http_parser to 2.5.0"). PR-URL: nodejs#1606 Reviewed-By: Fedor Indutny <[email protected]>
Some calls to ReqWrap would get through the initial check and allow the init callback to run, even though the callback had not been used on the parent. Fix by explicitly checking if the parent has a queue. Also change the name of the check, and internal field of AsyncHooks. Other names were confusing. PR-URL: nodejs#1614 Reviewed-By: Ben Noordhuis <[email protected]>
Allow the init callback to see the PROVIDER type easily by being able to compare the flag with the list of providers on the exported async_wrap object. PR-URL: nodejs#1614 Reviewed-By: Ben Noordhuis <[email protected]>
Setting flags using cryptic numeric object fields is confusing. Instead use much simpler .enable()/.disable() calls on the async_wrap object. PR-URL: nodejs#1614 Reviewed-By: Ben Noordhuis <[email protected]>
It doesn't make sense to call before/after callbacks in init to the parent because they'll be made anyway from MakeCallback. If information does need to be propagated then it should be done automatically. Will deal with this if the issue arrises in the future. PR-URL: nodejs#1614 Reviewed-By: Ben Noordhuis <[email protected]>
The `__attribute__((deprecated("warning")))` macro didn't exist until gcc 4.5 and clang 2.9. While io.js does not build with compilers that old, add-ons do. Let's make src/node.h compatible with such compilers, it's a public header. PR-URL: nodejs#1626 Refs: nodejs#1619 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
Introduced in commit b712af7 ("src: fix NODE_DEPRECATED macro with old compilers"). PR-URL: nodejs#1640 Reviewed-By: Roman Reiss <[email protected]>
The index of buffer to write in JSStream was always 0 by mistake. This fix was to use increment index of buffer arrays. The test was originally made by Brian White in nodejs#1594. Fix: nodejs#1595 Fix: nodejs#1594 PR-URL: nodejs#1635 Reviewed-By: Fedor Indutny <[email protected]>
Fixes: nodejs#1397 Fixes: nodejs#1512 Fixes: nodejs#1621 Fixes: nodejs#862 PR-URL: nodejs#1646 Reviewed-By: Ben Noordhuis <[email protected]>
Makes the ParseEncoding symbol visible to addons on Windows. It was already visible on Unices. PR-URL: nodejs#1596 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
If `len(args)` is less than two, then `install_path = dst_dir + node_prefix + '/'` would throw a `NameError`, because `dst_dir` will not be defined yet. So we are assigning `''` as the default value. PR-URL: nodejs#1628 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
Calling v8.setFlagsFromString with e.g a function as a flag argument gave no exception or warning that the function call will fail. There is now an exception if the function gets called with the wrong flag type (string is required) or that a flag is expected. Other APIs already provide exceptions if the argument has not the expected type. PR-URL: nodejs#1652 Reviewed-By: Ben Noordhuis <[email protected]>
Inside of a worker, disconnect event was not emitted on cluster.worker Fixes: nodejs#1304 PR-URL: nodejs#1386 Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#1539 Fixes: nodejs#1253 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Chris Dickinson <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
PR-URL: nodejs#1539 Fixes: nodejs#1253 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: Chris Dickinson <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
PR-URL: nodejs#1685 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Certain cases with comments inside arrays or object literals fail to pass eslint's comma-spacing rule. This change sets the comma-spacing rule to the 'warn' level. Once eslint/eslint#2408 is resolved and released, this rule should be set back to 'error' level. PR-URL: nodejs#1672 Reviewed-By: Yosuke Furukawa <[email protected]>
The old pattern didn't include files in lib/internal. This changes the pattern to directories which makes eslint apply to all subdirectories as well. PR-URL: nodejs#1686 Reviewed-By: Chris Dickinson <[email protected]>
In certain environments escape sequences could be splitted into multiple chunks. For example, when user presses left arrow, `\x1b[D` sequence could appear as two keypresses (`\x1b` + `[D`). PR-URL: nodejs#1601 Fixes: nodejs#1403 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Fixes: nodejs#1691 PR-URL: nodejs#1694 Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
In ssl.onerror event, `this` refers `ssl` so that `this._secureEstablished` is always undefined. Fix it to refer TLSSocket. PR-URL: nodejs#1661 Reviewed-By: Fedor Indutny <[email protected]>
SSL_read() returns 0 when fatal TLS Alert is received. Fix to invoke ssl error callback in this case. PR-URL: nodejs#1661 Reviewed-By: Fedor Indutny <[email protected]>
Pass along the PROVIDER type, that is already passed to AsyncWrap, along to BaseObject to set the handle_'s class id. This will allow all Persistents to be transversed and uniquely identified by what type they are using APIs such as v8::PersistentHandleVisitor. PR-URL: nodejs#1730 Reviewed-By: Ben Noordhuis <[email protected]>
Not sure what this is, smartos14-64
|
I also backported the linter changes because it's a candidate to cause conflicts in the future if it isn't. |
@jeisinger, was the security issue for v8 snapshots already fixed in v8 4.1 (what 1.8.x uses)? |
Yes, it's fixed already for several releases before that On Wed, May 20, 2015, 6:00 PM Jeremiah Senkpiel [email protected]
|
@Fishrock123 nothing in this batch sticks out as being potentially problematic. |
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: nodejs#1721 Reviewed-By: Ben Noordhuis <[email protected]> Conflicts: test/parallel/test-arm-math-exp-regress-1376.js test/parallel/test-net-dns-custom-lookup.js test/parallel/test-net-dns-lookup-skip.js test/parallel/test-repl-mode.js test/parallel/test-repl-options.js test/parallel/test-repl-tab.js test/parallel/test-util-inspect.js
DHE key lengths less than 1024bits is already weaken as pointed out in https://weakdh.org/ . 1024bits will not be safe in near future. We will extend this up to 2048bits somedays later. PR-URL: nodejs#1739 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
PR-URL: nodejs#1749 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
Improve detection and usage of pkg-config. This simplifies the setup of all our shared libraries. If pkg-config is installed on the host and `--shared` flags are passed by the user, we try to get defaults from pkg-config instead of using the default provided by configure. PR-URL: nodejs#1603 Reviewed-By: Ben Noordhuis <[email protected]>
Updated, @rvagg lgty? I'll propose 1.8.3 after this lands. |
I feel this may be reaching too far for an LTS, there's a lot of risk in some of these changes and I think my preference would be to focus on fixes more than performance improvements—note that the async listener changes are both semver-minor and semver-major but haven't been labelled as such as they are undocumented and I guess "experimental", so I'd rather not see them make it in. We need a better philosophical approach to defining LTS so we can tighten the scope of what gets in; I think this may be too much. Particularly in lieu of a full LTS WG that can comment on all of this I think we should opt for greater conservatism. I'll try and make time within the next couple of days to go over the commit list and comment and see if I can better define my thoughts about this through the process. |
Right, that's fine, let me know what should be dropped. :) |
Is this still needed? |
Closing unless we still want to patch up 1.x |
Basically everything we could backport to v1.x, including some build & perf improvements, I'm not too sure what we all want to take.
Commits have been slightly re-arranged in some cases to group related commits together.
I guess we should discuss what we do / don't want to take? I'm willing to do the grunt work of any metadata.
cc @rvagg @nodejs/lts (need to make that group soon..) maybe also cc @jasnell, he may have opinions?
Note: don't try to view the changes here, just don't.