Commit Graph

4584 Commits (67b235735e80209c6f199d15faa87cd0e068f6b8)

Author SHA1 Message Date
Ryan Dahl 67b235735e Remove support for cygwin 2011-10-19 16:23:26 -07:00
Ryan Dahl 9d27faa2c4 Revert "Fix #1801 vm: Use 'sandbox' as global_prototype"
Accidentally committed. Revert until review.

This reverts commit 200df8641b.
2011-10-19 11:01:08 -07:00
Thomas Parslow b0f78afe58 http: Added support for HTTP PATCH verb
Fixes #1907.
2011-10-19 19:59:16 +09:00
koichik 6a72e52520 buffer: use NO_NULL_TERMINATION flag
Refs #394.
Fixes #1902.
2011-10-19 15:03:00 +09:00
isaacs b70fed48a7 Don't use a separate context for the repl.
Fix #1484
Fix #1834
Fix #1482
Fix #771

It's been a while now, and we've seen how this separate context thing
works.  It constantly confuses people, and no one actually uses '.clear'
anyway, so the benefit of that feature does not justify the constant
WTFery.

This makes repl.context actually be a getter that returns the global
object, and prints a deprecation warning.  The '.clear' command is gone,
and will report that it's an invalid repl keyword.  Tests updated to
allow the require, module, and exports globals, which are still
available in the repl just like they were before, by making them global.
2011-10-18 18:18:32 -07:00
elliottcable 200df8641b Fix #1801 vm: Use 'sandbox' as global_prototype
Squashed commit:

(- re tests) Cleaning up the `Script` test suite.

For whatever reason, there were several duplicate test files related to `Script`
and the `'vm'` module. I removed these, and fixed a few other small issues.
(More fixes coming in subsequent commits.)

Squashes: 19e86045a0..1e3dcff4eb

(api fix:1801 new:1801) `'vm'` module uses sandbox as prototype

As described in GH-1801, the `'vm'` module was handling the `sandbox` object
provided by the API consumer in a particularly terrible and fragile fashion: it
was simply shallow-copying any enumerable properties from the sandbox onto the
global context before executing the code, and then eventually copying any values
on the global context back into the sandbox object *afterwards*.

This commit removes all of that implementation, and utilizes the passed sandbox
object as the *prototype of the context* instead. A bit of a hack, but a very
effective one.

This no longer allows for new variables created in the global context to be
placed into your sandbox after execution has completed, but that’s for the best
anyway, as it’s not very in line with the concept of a “box of passed-in
context.” I’m planning to further implement an interface for API consumers to
acquire the *actual global* from within the VM soon, thus allowing for
separation-of-concerns: providing data *to* the VM via the sandbox-prototype,
and exploring the internal environment of the VM itself.

// GitHub cruft: closes #1801

Squashes: 43b8e3c..209ed86
2011-10-18 17:56:35 -07:00
Ryan Dahl d9bc8455cb Fix test-c-ares.js on Windows by disabling PTR test 2011-10-18 16:12:07 -07:00
Ryan Dahl 6cc0c9e6a9 Remove superfluous nextTick during server binding
This breaks fork().send({}, server._handle) after server.listen() because
server._handle is not set.
2011-10-18 15:12:18 -07:00
Ryan Dahl dbfc8198a6 Upgrade GYP to r1078 2011-10-18 14:39:39 -07:00
Ryan Dahl 5783a52a9c Remove process.memoryUsage().vsize
Not meaningful cross platform; unused.
2011-10-18 14:31:37 -07:00
Ryan Dahl d77ce4b998 Fixes #1860. Remove process.writeError
Breaks a few tests in "make test-message"
2011-10-18 13:12:50 -07:00
koichik d2698d1822 http: add test for #1885 2011-10-17 16:14:35 +09:00
Yoshihiro Kikuchi f90ba61478 http: tiny fix in http.js
Fixes #1885.
2011-10-17 01:14:45 +09:00
koichik cdec7e3ae5 docs: improvement tls example 2011-10-16 16:50:16 +09:00
Igor Zinkovsky 5ca3dcd127 test: fix test-child-process-stdin and test-child-process-kill on windows 2011-10-15 22:55:24 +02:00
koichik d6191f593d net: fix error handling in listen()
Fixes #1894.
2011-10-16 01:30:19 +09:00
koichik 86a67f15a0 docs: add example of tls 2011-10-16 01:26:38 +09:00
koichik 68cc173c6d tls: The TLS API is inconsistent with the TCP API
Add 'secureConnect' event to tls.CleartextStream.

Fixes #1467.
2011-10-15 19:27:21 +09:00
Ben Noordhuis 0b92fa0e93 net: fix connect queue bugs
This commit fixes two bugs in the handling of write requests when the connect()
call is still in progress.

1. The deferred write request's size was counted twice towards `.bytesWritten`.

2. The callback was not called. After connecting, `Socket.write()` was called
   with three arguments (data, encoding, cb) but it ignored the third argument.

Coincidentally fixes test/simple/test-net-connect-buffer.js.
2011-10-15 03:34:09 +02:00
Ben Noordhuis 6df574b744 net: properly account multi-byte chars in .bytesWritten 2011-10-15 03:24:34 +02:00
Igor Zinkovsky 971c3d90eb win: remove pthread-win32 init code 2011-10-15 02:50:16 +02:00
Igor Zinkovsky 107b05772a build: fix windows build 2011-10-15 02:12:53 +02:00
Ben Noordhuis 2f8596ee10 test: fix bug in setproctitle test
Output from `ps` may contain trailing whitespace, trim it.
2011-10-15 02:07:57 +02:00
Ben Noordhuis 4908e5bf7a v8: implement VirtualMemory class on SunOS
Unbreaks build on SunOS. Un-reverts 9bbca99107.
2011-10-14 23:29:35 +00:00
isaacs e6f147141e doc: Add examples of zlib usage with http 2011-10-14 16:15:08 -07:00
Ben Noordhuis b6a869ef4f test: check that EventEmitter.on == EventEmitter.addListener 2011-10-15 01:08:41 +02:00
Ben Noordhuis 018e110cd1 test: replace .addListener() calls with .on() 2011-10-15 01:08:36 +02:00
Ben Noordhuis 3108a9ee38 uv: upgrade to 456f831 2011-10-15 00:42:10 +02:00
koichik 19a855382c tls: requestCert unusable with Firefox and Chrome
Fixes #1516.
2011-10-15 00:54:46 +09:00
koichik a09b747f30 child_process.fork: don't modify args
Fixes #1888.
2011-10-15 00:15:38 +09:00
Ben Noordhuis e0297ca59b node: fix use of potentially uninitialized variable 2011-10-14 15:05:02 +00:00
Ben Noordhuis 87b34c94fa timer_wrap: add sanity check assert 2011-10-14 15:01:26 +00:00
Ben Noordhuis 9193062e70 tcp_wrap: add sanity check asserts 2011-10-14 15:01:26 +00:00
Ben Noordhuis 0dc844de17 node_script: remove unused variable 2011-10-14 15:01:21 +00:00
Ben Noordhuis dc0b7364b5 node: fix arguments to uv_timer_start() 2011-10-14 14:43:49 +00:00
Ben Noordhuis f1d3ae7753 cares_wrap: make destructor virtual
A class with virtual methods should have a virtual destructor.
2011-10-14 14:39:25 +00:00
Ryan Dahl 33b5f2f779 Upgrade V8 to 3.7.0 2011-10-13 17:45:02 -07:00
isaacs 59a5262041 Fix #1882 zlib Update 'availOutBefore' value, and test 2011-10-13 16:47:51 -07:00
Guglielmo Ferri 66a10b6e58 docs: add API documentation note about UDP datagram size 2011-10-13 18:10:01 +02:00
Maciej Małecki 683c1c6583 docs: document `process.versions` 2011-10-13 17:02:54 +02:00
Simen Brekken 4b0e36810a net: register net.Server callback only once
Only register once for listening when passing a callback to Server.listen(),
this prevents servers recycled using close() from invoking the callback when
Server.listen() is called later.
2011-10-13 16:09:14 +02:00
Ben Noordhuis fab68aa1ed platform: support long process names on linux 2011-10-13 15:48:02 +02:00
Ben Noordhuis 5faff9ebdf test: test long process name support
On platforms that support it: linux, freebsd, darwin
2011-10-13 15:47:05 +02:00
koichik 1b55010a04 docs: added .json modules. 2011-10-13 17:06:27 +09:00
Brian White f243ca199b docs: mention util instead of sys 2011-10-13 05:06:42 +02:00
Ryan Dahl 3a34972672 Fix test-http-conn-reset.js on OSX 2011-10-12 17:31:49 -07:00
Ilya Dmitrichenko 39987cbc80 docs: improved fs.Stats section in API documentation 2011-10-13 02:25:30 +02:00
Arnout Kazemier e3d2ae0bfd sys has been moved to util 2011-10-13 02:21:37 +02:00
Ryan Dahl e911171e03 Move some slow tests to pummel 2011-10-12 16:59:00 -07:00
Ryan Dahl 7b4370e5f8 Fix test/pummel/test-watch-file.js 2011-10-12 16:19:46 -07:00