Skip to content
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

Merge v0.12 #236

Merged
merged 210 commits into from
Jan 5, 2015
Merged

Merge v0.12 #236

merged 210 commits into from
Jan 5, 2015

Conversation

bnoordhuis
Copy link
Member

indutny and others added 30 commits October 6, 2014 18:45
Do not call SSL_read() and ignore ZERO_RETURN if the connection was
shutdown and there could not be any reads.

Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: nodejs/node-v0.x-archive#8519
Do not send signal to children if they are already in debug mode.
Node.js on Windows does not register signal handler, and thus calling
`process._debugProcess()` will throw an error.

Reviewed-By: Trevor Norris <[email protected]>
PR-URL: nodejs/node-v0.x-archive#8476
Because of behavior change of some V8 APIs (they mostly became more
    strict), following modules needed to be fixed:

* crypto: duplicate prototype methods are not allowed anymore
* contextify: some TryCatch trickery, the binding was using it
incorrectly
* util: maximum call stack error is now crashing in a different place

Reviewed-By: Trevor Norris <[email protected]>
PR-URL: nodejs/node-v0.x-archive#8476
The cluster children are hitting breakpoint at `cluster.onread` and
hanging on a Semaphore wait now. This prevents them from disconnecting
gracefully. Considering that the test is checking different thing, the
cluster children needs to be force killed from the grand parent process.

Reviewed-By: Trevor Norris <[email protected]>
PR-URL: nodejs/node-v0.x-archive#8476
This change in V8: https://code.google.com/p/v8/source/detail?r=22210
has introduced a method named OS::GetCurrentThreadId which fails to
compile on OSes where a "gettid" syscall does not exist.
This build issue has been fixed upstream by another change:
https://code.google.com/p/v8/source/detail?r=23459. This commit
integrates this fix. It's still not clear if this is good enough for the
long term, see https://code.google.com/p/v8/issues/detail?id=3620 for
more information.

The other build issue was due to the fact that alloca.h is not included
by other system includes on SmartOS, which is assumed by V8.

PR-URL: nodejs/node-v0.x-archive#8534
Reviewed-By: Fedor Indutny <[email protected]>
Update following macros:

* NODE_NET_SOCKET_{READ,WRITE}() - they both take 4 arguments,
  not 2

* NODE_COUNT_GC_PERCENTTIME() - it takes a single argument.

Use INT_PTR instead of INT32 in pointer casts in win32_etw provider.

PR-URL: nodejs/node-v0.x-archive#8294
Reviewed-By: Fedor Indutny <[email protected]>
This is the latest certdata.txt from [0], last updated on 2014-10-08.

[0] https://hg.mozilla.org/mozilla-central/raw-file/f0bb13ef0ee4/security/nss/lib/ckfw/builtins/certdata.txt

PR-URL: node-forward/node#7
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
Update the list of root certificates in src/node_root_certs.h with
tools/mk-ca-bundle.pl.

PR-URL: node-forward/node#7
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
Link with -z,noexecstack to make stack memory non-executable.  Makes
shellcode injection through buffer overflows more difficult.

Fixes: nodejs/node-v0.x-archive#7542
PR-URL: node-forward/node#8
Reviewed-By: Trevor Norris <[email protected]>
Provide default Platform implementation for v8's purposes.
The new v8 doesn't build on non gnu++0x, set it to a proper value for
all systems.
API callback functions don't need to create a v8::HandleScope instance
because V8 already creates one in the JS->C++ adapter frame.

PR-URL: node-forward/node#16
Reviewed-By: Fedor Indutny <[email protected]>
Make tools/check-imports.sh stop complaining, remove or reorder 'using'
statements.

PR-URL: node-forward/node#16
Reviewed-By: Fedor Indutny <[email protected]>
Mechanically replace assert() statements with UNREACHABLE(), CHECK(),
or CHECK_{EQ,NE,LT,GT,LE,GE}() statements.

The exceptions are src/node.h and src/node_object_wrap.h because they
are public headers.

PR-URL: node-forward/node#16
Reviewed-By: Fedor Indutny <[email protected]>
On POSIX platforms, check that the uid and gid match the euid and egid
respectively before looking up the environment variable.

Before this commit, an i18n-enabled suid node would cheerfully load
attacker-controlled ICU data through the NODE_ICU_DATA environment
variable.

This commit is not a complete fix.  For example, it's up for debate
what to do with the NODE_CHANNEL_FD environment variable.

PR-URL: node-forward/node#18
Reviewed-By: Fedor Indutny <[email protected]>
Defined in src/node.cc but not actually in use; remove it.

PR-URL: node-forward/node#18
Reviewed-By: Fedor Indutny <[email protected]>
Remove a few Environment::GetCurrent() calls that g++ failed to detect
were not used for anything.  The return value was assigned to a local
variable but not used meaningfully.

PR-URL: node-forward/node#18
Reviewed-By: Fedor Indutny <[email protected]>
Attach the per-context execution environment directly to API functions.
Rationale:

 * Gets node one step closer to multi-isolate readiness.

 * Avoids multi-context confusion, e.g. when the caller and callee live
   in different contexts.

 * Avoids expensive calls to pthread_getspecific() on platforms where
   V8 does not know how to use the thread-local storage directly.
   (Linux, the BSDs.)

PR-URL: node-forward/node#18
Reviewed-By: Fedor Indutny <[email protected]>
The test implicitly assumed that crypto operations complete in the same
order as they are started but, because they go round-trip through the
thread pool, there is no such guarantee.  Enforce proper sequencing.

Fixes node-forward/node#22.

PR-URL: node-forward/node#23
Reviewed-By: Fedor Indutny <[email protected]>
Fix double definition errors in the libv8_base.a library target by
compiling out stub functions when building for x32.

This fix is incomplete because, although V8 now builds, it makes a
number of bad assumptions about the size of stack slots, see
https://code.google.com/p/v8/issues/detail?id=3630.

PR-URL: node-forward/node#24
Reviewed-By: Fedor Indutny <[email protected]>
This commit adds preliminary x32 support.  Configure with:

    $ ./configure --dest-cpu=x32

PR-URL: node-forward/node#24
Reviewed-By: Fedor Indutny <[email protected]>
bnoordhuis and others added 21 commits December 20, 2014 02:38
Don't use Number#toPrecision(), it switches to scientific notation for
numbers with more digits than the precision; use Number#toFixed().

PR-URL: nodejs#185
Reviewed-By: Chris Dickinson <[email protected]>
Replace the call to Array#splice() with a faster open-coded version
that creates less garbage.

Add a new benchmark to prove it.  With the change applied, it scores
a whopping 40% higher.

PR-URL: nodejs#185
Reviewed-By: Chris Dickinson <[email protected]>
Rename the url.parse() benchmark from url.js to url-parse.js.
A follow-up commit is going to add another one for url.resolve().

PR-URL: nodejs#184
Reviewed-By: Chris Dickinson <[email protected]>
Replace the call to Array#splice() with a faster open-coded version
that creates less garbage.

Add a new benchmark to prove it.  With the change applied, it scores
about 5% higher and that is nothing to sneeze at.

PR-URL: nodejs#184
Reviewed-By: Chris Dickinson <[email protected]>
They can't compile io.js anyway.

PR-URL: nodejs#187
Reviewed-By: Ben Noordhuis <[email protected]>
Change of Object.keys in ES6 breaks assert.deepEqual about primitive
values.

V8: https://code.google.com/p/v8/issues/detail?id=3443

Previously deepEqual depends on Object.key that throws an error for
a primitive value, but now Object.key does not throw.

PR-URL: nodejs#193
Reviewed-By: Ben Noordhuis <[email protected]>
Previously the code that builds the Table of Contents threw
an exception because of jump from an H1 heading directly to an H3
heading.

By changing the H3 heading to an H2, 'make doc' works again. This is
also consistent with other docs like console.markdown which use
H2 for method call documentation.

PR-URL: nodejs#203
Reviewed-By: Ben Noordhuis <[email protected]>
`console.time()` and `console.timeEnd()` are very closely related. It's
useful to reference them both from each other.

Previously, console.time() did not mention that it needed to be paired
with a call to console.timeEnd() to be useful, and timeEnd() also failed
to mention that console.time() needed to be called first.

References in both directions have been added.

PR-URL: nodejs#198
Reviewed-By: Ben Noordhuis <[email protected]>
The GCC version is no longer relevant since only 4.8 and newer are
supported. It's probably safe to assume clang on mac since V8 does
so too.

PR-URL: nodejs#205
Reviewed-By: Ben Noordhuis <[email protected]>
This commit changes `lib/dgram.js` Sockets to, when
they are bound to a port / IP, return themselves. This
is done in order to allow chaining of methods and be
in accordance with the `lib/net.js` library.

PR-URL: nodejs#214
Reviewed-By: Ben Noordhuis <[email protected]>
This commit adds a return statement to the dgram.Socket.close()
function that returns itself after it finishes. This follows along
the functionality of the more popular and, dare I say, father-library
`lib/net.js`.

PR-URL: nodejs#214
Reviewed-By: Ben Noordhuis <[email protected]>
The maxBuffer option was not self-documenting, so document the unit and
its effect.

PR-URL: nodejs#209
Reviewed-By: Ben Noordhuis <[email protected]>
Emit the close event asynchronously, after the close, as it is with the
net/http close events.

PR-URL: nodejs#217
Reviewed-By: Ben Noordhuis <[email protected]>
Like net, http, and https server.close, and socket.end(), etc.

PR-URL: nodejs#217
Reviewed-By: Ben Noordhuis <[email protected]>
Also, tests to confirm its existence.

PR-URL: nodejs#217
Reviewed-By: Ben Noordhuis <[email protected]>
This makes require('process') always return a reference to the global
process object.

PR-URL: nodejs#206
Reviewed-By: Ben Noordhuis <[email protected]>
Document the --trace-deprecation flag and the `process` properties that
affect util.deprecate().

Fixes: nodejs#190
PR-URL: nodejs#191
Reviewed-By: Jonathan Ong <[email protected]>
Closes nodejs#163

PR-URL: nodejs#178
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Bert Belder <[email protected]>
I was originally going to do this after the v0.11.15 release, but as
that release is three weeks overdue now, I decided not to wait any
longer; we don't want the delta to get too big.

Conflicts:
	lib/net.js
	test/simple/simple.status

PR-URL: nodejs#236
Reviewed-By: Bert Belder <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
@piscisaureus
Copy link
Contributor

All merged patches are properly reviewed by TC members (except 372a2f5), so a rubberstamp LGTM from me.

One thing I'm incredibly unhappy about is the on-demand download of ICU which is now always needed to build node. But that's out of scope for this PR.

@piscisaureus
Copy link
Contributor

What I would do though is upgrade libuv first to the latest stable and do the merge after that (with -X ours for the libuv folder).

@bnoordhuis
Copy link
Member Author

What I would do though is upgrade libuv first to the latest stable and do the merge after that

Can you explain why? joyent/node and io.js are currently at the same version, v1.0.2.

@indutny
Copy link
Member

indutny commented Jan 5, 2015

LGTM, please land.

@bnoordhuis bnoordhuis merged commit 94e1475 into nodejs:v1.x Jan 5, 2015
@bnoordhuis bnoordhuis deleted the merge-v0.12 branch January 5, 2015 19:05
@bnoordhuis
Copy link
Member Author

GH gets terribly confused when you amend merge commit logs but at any rate, the merge landed in commit 94e1475.

@piscisaureus
Copy link
Contributor

Can you explain why? joyent/node and io.js are currently at the same version, v1.0.2.

It used to be at 1.0.1 in io.js but it no longer matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.