Commit Graph

6024 Commits (10ce3d129d4e466842a03545fdfdfc011e0b9fba)

Author SHA1 Message Date
isaacs 10ce3d129d Domain hooks in ReqWrap<T> and MakeCallback 2012-04-17 13:14:55 -07:00
isaacs 963459d736 Domain feature
This is a squashed commit of the main work done on the domains-wip branch.

The original commit messages are preserved for posterity:

* Implicitly add EventEmitters to active domain
* Implicitly add timers to active domain
* domain: add members, remove ctor cb
* Don't hijack bound callbacks for Domain error events
* Add dispose method
* Add domain.remove(ee) method
* A test of multiple domains in process at once
* Put the active domain on the process object
* Only intercept error arg if explicitly requested
* Typo
* Don't auto-add new domains to the current domain

    While an automatic parent/child relationship is sort of neat,
    and leads to some nice error-bubbling characteristics, it also
    results in keeping a reference to every EE and timer created,
    unless domains are explicitly disposed of.

* Explicitly adding one domain to another is still fine, of course.
* Don't allow circular domain->domain memberships
* Disposing of a domain removes it from its parent
* Domain disposal turns functions into no-ops
* More documentation of domains
* More thorough dispose() semantics
* An example using domains in an HTTP server
* Don't handle errors on a disposed domain
* Need to push, even if the same domain is entered multiple times
* Array.push is too slow for the EE Ctor
* lint domain
* domain: docs
* Also call abort and destroySoon to clean up event emitters
* domain: Wrap destroy methods in a try/catch
* Attach tick callbacks to active domain
* domain: Only implicitly bind timers, not explicitly
* domain: Don't fire timers when disposed.
* domain: Simplify naming so that MakeCallback works on Timers
* Add setInterval and nextTick to domain test
* domain: Make stack private
2012-04-17 13:14:55 -07:00
isaacs a26bee8fa1 MakeCallback: Consistent symbol usage 2012-04-17 13:14:54 -07:00
isaacs db45b2ca02 MakeCallback: Use in node_signal_watcher 2012-04-17 12:00:58 -07:00
isaacs e1dd570585 MakeCallback: Use in node_io_watcher 2012-04-17 12:00:58 -07:00
isaacs 35c0cd219d MakeCallback: Use in node_crypto 2012-04-17 12:00:58 -07:00
isaacs 91701c2db1 MakeCallback: Use in node_file.cc 2012-04-17 12:00:58 -07:00
isaacs 88f94fa28c MakeCallback: abort() if not a function 2012-04-17 12:00:58 -07:00
isaacs ac1aaddc00 MakeCallback: Return the callback return value 2012-04-17 11:56:33 -07:00
isaacs 7407be896e MakeCallback: Accept Function or Symbol argument 2012-04-17 11:56:32 -07:00
isaacs 80a55e9c83 Report errors thrown from uncaughtException handers 2012-04-17 11:56:32 -07:00
Nathan Rajlich e621250116 test: lowercase setRawMode() test case filename 2012-04-17 11:53:50 -07:00
Nathan Rajlich e28eb6de30 doc: update the `readline` docs for the "close" event behavior 2012-04-17 11:53:50 -07:00
Nathan Rajlich 327286dbcd repl: update the `repl` for the new `readline` behavior
This fixes the failing REPL tests.
2012-04-17 11:53:50 -07:00
Nathan Rajlich c5d35aca33 test: check for multiple "emit" calls in repl-end-emits-exit.js 2012-04-17 11:53:50 -07:00
Nathan Rajlich 9c3559f0ad readline: re-add the Interface#close() method; rename "end" to "close"
The idea here is to reduce the number of times that `setRawMode()` is called
on the `input` stream, since it is expensive, and simply pause()/resume()
should not call it.

So now `setRawMode()` only gets called at the beginning of the Interface
instance, and then when `Interface#close()` is called.

Test case included.
2012-04-17 11:53:50 -07:00
Nathan Rajlich 86bd9b6e70 doc: change `in` to `input` in the readline docs
Also compacting some long lines.
2012-04-17 11:53:49 -07:00
Kyle Robinson Young 718aa505c4 doc: add require.extensions to globals
Closes #3028
2012-04-17 17:10:42 +02:00
Kyle Robinson Young 7cd1690f3d doc: add cache argument to fs.realpath() 2012-04-17 14:17:41 +02:00
domenic 5bc07cc90b doc: note that `stream.pause` is advisory 2012-04-17 14:14:09 +02:00
ssuda 70005be4ff Fixing ClientRequest setTimeout EventEmitter Leak
This will fix #3068
2012-04-16 23:36:18 +02:00
Zachary Scott 540a441259 docs: fix broken links in zlib docs 2012-04-16 23:06:52 +02:00
Zachary Scott b4626afb61 docs: url.format uses host for hostname and port, not auth
Fixes #3062.
2012-04-16 22:28:02 +02:00
Zachary Scott 59e6b14395 docs: url.host doesn't include auth
Fixes #3062.
2012-04-16 22:27:54 +02:00
fukayatsu 0f95a93a2c tls: remove duplicate line 2012-04-16 21:38:26 +02:00
Shigeki Ohtsu 0d13142332 tcp: make getsockname() return address family as string 2012-04-16 18:00:47 +02:00
Ben Noordhuis 21d2683976 test: don't make request until server is listening
Preemptively fixes simple/test-https-timeout on platforms where binding to an
interface is not an instantaneous action.
2012-04-16 18:00:47 +02:00
ssuda 48d52d85c3 http, https: fix .setTimeout()
Fixes #3107.
2012-04-16 18:00:38 +02:00
Kyle Robinson Young 0a83b78ba8 docs: more explicit argument names in fs 2012-04-16 16:31:02 +02:00
Maciej Małecki f065c87bcf events: remove misleading comment 2012-04-15 15:52:56 +02:00
Ben Noordhuis c945eae942 deps: fix -DOPENSSL_NO_SOCK on sunos
The OPENSSL_NO_SOCK macro in OpenSSL missed a couple of networking functions
that called other functions that OPENSSL_NO_SOCK *had* filtered out. None of
the functions (filtered or not) were actually used but it was enough to trip
up the Solaris linker.
2012-04-14 22:05:17 +00:00
Mustansir Golawala 7ee15457ed os: add cross platform EOL character 2012-04-14 23:17:38 +02:00
isaacs 93cefab1a3 Set errno in fake-failing child-process kill test 2012-04-13 16:53:51 -07:00
Ben Noordhuis b7b7b29f50 dns: remove unused functions 2012-04-13 14:46:35 +02:00
Zachary Scott 46acb09ed8 docs: rewrite "addons" docs to use node-gyp
Closes #3100.
Closes #3101.
2012-04-12 18:32:01 -07:00
Aaron Jacobs 1444801374 typed arrays: unexport SizeOfArrayElementForType()
It isn't used anywhere else, so made it an implementation detail in
v8_typed_array.cc.
2012-04-12 23:48:49 +02:00
Ben Noordhuis 16fca262be net: honor 'enable' flag in .setNoDelay()
Fixes #3096.
2012-04-12 19:15:32 +02:00
Andreas Madsen 5b43c63c88 child_process: emit error when .kill fails 2012-04-12 08:17:42 -07:00
isaacs 04271a5e93 gyp: Apply 'argument too long' fix in another place
For some reason, aa5961a445 caused
'make test' to rebuild the entire project every time.  Applying
the fix to the other place where gyp chops up the argument list
makes it behave properly.
2012-04-11 18:26:52 -07:00
Bert Belder 1c88c3b3b5 Disable OpenSSL UI 2012-04-12 01:34:05 +02:00
Ben Noordhuis 916b5d1fff test: merge tls-ext-key-usage into tls-securepair-client 2012-04-12 01:34:05 +02:00
Ben Noordhuis 6cbed959e6 test: fix openssl tests
Don't assume that the libcrypto and libssl that we're linked against is the same
version as the openssl command line tool. This is important because the tool has
a bug in all pre-1.0.0 versions that makes it unusable for these tests.
2012-04-12 01:34:05 +02:00
Ben Noordhuis 2639566c6e build: configure openssl
* compile with -DOPENSSL_NO_SOCK and -DOPENSSL_NO_DGRAM, we don't need it
* compile with -DOPENSSL_NO_GOST and -DOPENSSL_NO_HW_PADLOCK, works around the
  brain dead linker on solaris and maybe others
* compile with -DTERMIOS, OS X doesn't have <termio.h>
* compile with -D__EXTENSIONS__ on solaris, makes siginfo_t available
* compile without -ansi on linux, it hides a number of POSIX declarations
  (sigaction, NI_MAXHOST, etc.)
2012-04-12 01:34:05 +02:00
Ben Noordhuis 3694b6914a deps: reapply 0a34755 to bundled openssl 2012-04-12 01:34:05 +02:00
Ben Noordhuis 0f9d201183 deps: reapply 0110c90 to bundled openssl 2012-04-12 01:34:05 +02:00
Ben Noordhuis 30e7fb7307 deps: upgrade openssl to 1.0.0f 2012-04-12 01:34:05 +02:00
Ben Noordhuis aa5961a445 gyp: fix 'argument list too long' build error 2012-04-12 01:34:04 +02:00
Ben Noordhuis e9dcfd4bd2 Revert "deps: upgrade libuv to 3c41597"
This reverts commit 0db4dc0024.

This commit makes a lot of tests fail due to reference counting errors. It's
not worth it to debug because the reference counting scheme is due to change
soon anyway.
2012-04-12 00:59:38 +02:00
Bert Belder 3ec84a11f8 Slab allocator: don't attempt to shrink a non-buffer 2012-04-11 22:02:12 +02:00
Nathan Rajlich 9b7a6c5238 configure: output a newline at the end of config.gypi 2012-04-11 11:16:47 -07:00