From 57d28579384d8bf734b7af920c8dff4099c61c9a Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 6 Dec 2011 18:09:43 +0100 Subject: [PATCH 1/5] uv: upgrade to 0db3274 --- deps/uv/src/unix/stream.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c index 25737814e5..035e638329 100644 --- a/deps/uv/src/unix/stream.c +++ b/deps/uv/src/unix/stream.c @@ -341,6 +341,13 @@ static void uv__write(uv_stream_t* stream) { int iovcnt; ssize_t n; + if (stream->flags & UV_CLOSING) { + /* Handle was closed this tick. We've received a stale + * 'is writable' callback from the event loop, ignore. + */ + return; + } + start: assert(stream->fd >= 0); From 23bb5986d4c97dde538622283864b3eed23493d8 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 6 Dec 2011 21:47:30 +0100 Subject: [PATCH 2/5] Remove unused variable. The file descriptor arg to child_process._forkChild() is not used any more. Remove it, avoids future confusion. --- src/node.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/node.js b/src/node.js index 5e7ae12061..15cccb68fa 100644 --- a/src/node.js +++ b/src/node.js @@ -416,8 +416,7 @@ // If we were spawned with env NODE_CHANNEL_FD then load that up and // start parsing data from that stream. if (process.env.NODE_CHANNEL_FD) { - var fd = parseInt(process.env.NODE_CHANNEL_FD); - assert(fd >= 0); + assert(parseInt(process.env.NODE_CHANNEL_FD) >= 0); var cp = NativeModule.require('child_process'); // Load tcp_wrap to avoid situation where we might immediately receive @@ -425,7 +424,7 @@ // FIXME is this really necessary? process.binding('tcp_wrap') - cp._forkChild(fd); + cp._forkChild(); assert(process.send); } } From 70bc2e32af8a0215b5e1e4e83fb1c00a457cf663 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 6 Dec 2011 21:53:52 +0100 Subject: [PATCH 3/5] test: new test, verify that we don't close and reuse fd 0 --- test/fixtures/destroy-stdin.js | 1 + test/simple/test-child-process-fork3.js | 32 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 test/fixtures/destroy-stdin.js create mode 100644 test/simple/test-child-process-fork3.js diff --git a/test/fixtures/destroy-stdin.js b/test/fixtures/destroy-stdin.js new file mode 100644 index 0000000000..12b12fb026 --- /dev/null +++ b/test/fixtures/destroy-stdin.js @@ -0,0 +1 @@ +process.stdin.destroy(); diff --git a/test/simple/test-child-process-fork3.js b/test/simple/test-child-process-fork3.js new file mode 100644 index 0000000000..a8a8985f05 --- /dev/null +++ b/test/simple/test-child-process-fork3.js @@ -0,0 +1,32 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var common = require('../common'); +var assert = require('assert'); +var fork = require('child_process').fork; + +var filename = common.fixturesDir + '/destroy-stdin.js'; + +// Ensure that we don't accidentally close fd 0 and +// reuse it for something else, it causes all kinds +// of obscure bugs. +process.stdin.destroy(); +fork(filename).stdin.on('end', process.exit); From fd29448be028125ec1521ddc268314ac20ebc440 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 6 Dec 2011 21:59:25 +0100 Subject: [PATCH 4/5] test: add missing copyright headers --- test/disabled/GH-670.js | 21 +++++++++++++++++++ test/pummel/test-regress-GH-814.js | 21 +++++++++++++++++++ test/pummel/test-regress-GH-814_2.js | 21 +++++++++++++++++++ test/pummel/test-timer-wrap.js | 21 +++++++++++++++++++ test/pummel/test-timer-wrap2.js | 21 +++++++++++++++++++ .../test-child-process-customfd-bounded.js | 21 +++++++++++++++++++ test/simple/test-child-process-fork.js | 21 +++++++++++++++++++ test/simple/test-child-process-fork2.js | 21 +++++++++++++++++++ ...test-event-emitter-check-listener-leaks.js | 21 +++++++++++++++++++ test/simple/test-fs-utimes.js | 21 +++++++++++++++++++ test/simple/test-http-response-readable.js | 21 +++++++++++++++++++ test/simple/test-net-remote-address-port.js | 21 +++++++++++++++++++ .../test-net-server-listen-remove-callback.js | 21 +++++++++++++++++++ test/simple/test-process-next-tick.js | 21 +++++++++++++++++++ test/simple/test-punycode.js | 21 +++++++++++++++++++ test/simple/test-readdouble.js | 21 +++++++++++++++++++ test/simple/test-readfloat.js | 21 +++++++++++++++++++ test/simple/test-readint.js | 21 +++++++++++++++++++ test/simple/test-readuint.js | 21 +++++++++++++++++++ test/simple/test-regress-GH-1697.js | 21 +++++++++++++++++++ test/simple/test-regress-GH-784.js | 21 +++++++++++++++++++ test/simple/test-regress-GH-819.js | 21 +++++++++++++++++++ test/simple/test-regress-GH-877.js | 21 +++++++++++++++++++ test/simple/test-regress-GH-897.js | 21 +++++++++++++++++++ test/simple/test-stream-pipe-multi.js | 21 +++++++++++++++++++ test/simple/test-tcp-wrap-connect.js | 21 +++++++++++++++++++ test/simple/test-tcp-wrap-listen.js | 21 +++++++++++++++++++ test/simple/test-tcp-wrap.js | 21 +++++++++++++++++++ test/simple/test-tty-wrap.js | 21 +++++++++++++++++++ .../test-vm-create-context-accessors.js | 21 +++++++++++++++++++ ...st-vm-create-context-circular-reference.js | 21 +++++++++++++++++++ test/simple/test-writedouble.js | 21 +++++++++++++++++++ test/simple/test-writefloat.js | 21 +++++++++++++++++++ test/simple/test-writeint.js | 21 +++++++++++++++++++ test/simple/test-writeuint.js | 21 +++++++++++++++++++ test/simple/test-zlib-random-byte-pipes.js | 20 ++++++++++++++++++ 36 files changed, 755 insertions(+) diff --git a/test/disabled/GH-670.js b/test/disabled/GH-670.js index b6eb0c1210..e717e3fd2e 100644 --- a/test/disabled/GH-670.js +++ b/test/disabled/GH-670.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var assert = require('assert'); var https = require('https'); var tls = require('tls'); diff --git a/test/pummel/test-regress-GH-814.js b/test/pummel/test-regress-GH-814.js index 20183960e0..e4c9c92ce6 100644 --- a/test/pummel/test-regress-GH-814.js +++ b/test/pummel/test-regress-GH-814.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + // Flags: --expose_gc function newBuffer(size, value) { diff --git a/test/pummel/test-regress-GH-814_2.js b/test/pummel/test-regress-GH-814_2.js index 7443e4f57e..8015f4ed24 100644 --- a/test/pummel/test-regress-GH-814_2.js +++ b/test/pummel/test-regress-GH-814_2.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + // Flags: --expose_gc var common = require('../common'); diff --git a/test/pummel/test-timer-wrap.js b/test/pummel/test-timer-wrap.js index 368b5a1520..fbf82d505d 100644 --- a/test/pummel/test-timer-wrap.js +++ b/test/pummel/test-timer-wrap.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); diff --git a/test/pummel/test-timer-wrap2.js b/test/pummel/test-timer-wrap2.js index 8a7502888b..4fb424a54c 100644 --- a/test/pummel/test-timer-wrap2.js +++ b/test/pummel/test-timer-wrap2.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); diff --git a/test/simple/test-child-process-customfd-bounded.js b/test/simple/test-child-process-customfd-bounded.js index 203e6acaf3..c1efd8378d 100644 --- a/test/simple/test-child-process-customfd-bounded.js +++ b/test/simple/test-child-process-customfd-bounded.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var bigish = Array(200); diff --git a/test/simple/test-child-process-fork.js b/test/simple/test-child-process-fork.js index aebabc6c9d..4860732b71 100644 --- a/test/simple/test-child-process-fork.js +++ b/test/simple/test-child-process-fork.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var assert = require('assert'); var common = require('../common'); var fork = require('child_process').fork; diff --git a/test/simple/test-child-process-fork2.js b/test/simple/test-child-process-fork2.js index f0f73217aa..3116320830 100644 --- a/test/simple/test-child-process-fork2.js +++ b/test/simple/test-child-process-fork2.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var assert = require('assert'); var common = require('../common'); var fork = require('child_process').fork; diff --git a/test/simple/test-event-emitter-check-listener-leaks.js b/test/simple/test-event-emitter-check-listener-leaks.js index 66e257cf3e..adc7119517 100644 --- a/test/simple/test-event-emitter-check-listener-leaks.js +++ b/test/simple/test-event-emitter-check-listener-leaks.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var assert = require('assert'); var events = require('events'); diff --git a/test/simple/test-fs-utimes.js b/test/simple/test-fs-utimes.js index 352b444766..df75fcb641 100644 --- a/test/simple/test-fs-utimes.js +++ b/test/simple/test-fs-utimes.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); var util = require('util'); diff --git a/test/simple/test-http-response-readable.js b/test/simple/test-http-response-readable.js index d0adfe364c..b31fcc3d12 100644 --- a/test/simple/test-http-response-readable.js +++ b/test/simple/test-http-response-readable.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); var http = require('http'); diff --git a/test/simple/test-net-remote-address-port.js b/test/simple/test-net-remote-address-port.js index 103e1db2b3..9b585fce9e 100644 --- a/test/simple/test-net-remote-address-port.js +++ b/test/simple/test-net-remote-address-port.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); diff --git a/test/simple/test-net-server-listen-remove-callback.js b/test/simple/test-net-server-listen-remove-callback.js index 50733da9e4..2efcbd5a6f 100644 --- a/test/simple/test-net-server-listen-remove-callback.js +++ b/test/simple/test-net-server-listen-remove-callback.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); var net = require('net'); diff --git a/test/simple/test-process-next-tick.js b/test/simple/test-process-next-tick.js index bef7bccf07..e8706cbfde 100644 --- a/test/simple/test-process-next-tick.js +++ b/test/simple/test-process-next-tick.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var assert = require('assert'); var N = 2; var tickCount = 0; diff --git a/test/simple/test-punycode.js b/test/simple/test-punycode.js index 2cdc9ecd45..9a144c58a1 100644 --- a/test/simple/test-punycode.js +++ b/test/simple/test-punycode.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + // Copyright (C) 2011 by Ben Noordhuis // // Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/test/simple/test-readdouble.js b/test/simple/test-readdouble.js index d0b3605ddc..3599a3f5fe 100644 --- a/test/simple/test-readdouble.js +++ b/test/simple/test-readdouble.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + /* * Tests to verify we're reading in doubles correctly */ diff --git a/test/simple/test-readfloat.js b/test/simple/test-readfloat.js index 91607c6451..9bb3529881 100644 --- a/test/simple/test-readfloat.js +++ b/test/simple/test-readfloat.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + /* * Tests to verify we're reading in floats correctly */ diff --git a/test/simple/test-readint.js b/test/simple/test-readint.js index bd39078e87..40d4abbb5d 100644 --- a/test/simple/test-readint.js +++ b/test/simple/test-readint.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + /* * Tests to verify we're reading in signed integers correctly */ diff --git a/test/simple/test-readuint.js b/test/simple/test-readuint.js index a3926c1d17..d4ad6019fc 100644 --- a/test/simple/test-readuint.js +++ b/test/simple/test-readuint.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + /* * A battery of tests to help us read a series of uints */ diff --git a/test/simple/test-regress-GH-1697.js b/test/simple/test-regress-GH-1697.js index 6c0474f635..a5f8a06184 100644 --- a/test/simple/test-regress-GH-1697.js +++ b/test/simple/test-regress-GH-1697.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var net = require('net'), cp = require('child_process'), util = require('util'); diff --git a/test/simple/test-regress-GH-784.js b/test/simple/test-regress-GH-784.js index a33b6f23c4..c2039a9c6a 100644 --- a/test/simple/test-regress-GH-784.js +++ b/test/simple/test-regress-GH-784.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + // Regression test for GH-784 // https://github.com/joyent/node/issues/784 // diff --git a/test/simple/test-regress-GH-819.js b/test/simple/test-regress-GH-819.js index 16d0f3bc54..874d99e285 100644 --- a/test/simple/test-regress-GH-819.js +++ b/test/simple/test-regress-GH-819.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var net = require('net'); var assert = require('assert'); diff --git a/test/simple/test-regress-GH-877.js b/test/simple/test-regress-GH-877.js index 9021354636..0714e6df5d 100644 --- a/test/simple/test-regress-GH-877.js +++ b/test/simple/test-regress-GH-877.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var http = require('http'); var assert = require('assert'); diff --git a/test/simple/test-regress-GH-897.js b/test/simple/test-regress-GH-897.js index fae1bd4b5d..dd4399f16f 100644 --- a/test/simple/test-regress-GH-897.js +++ b/test/simple/test-regress-GH-897.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); diff --git a/test/simple/test-stream-pipe-multi.js b/test/simple/test-stream-pipe-multi.js index 00d17f1742..9a8535ffe7 100644 --- a/test/simple/test-stream-pipe-multi.js +++ b/test/simple/test-stream-pipe-multi.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + // Test that having a bunch of streams piping in parallel // doesn't break anything. diff --git a/test/simple/test-tcp-wrap-connect.js b/test/simple/test-tcp-wrap-connect.js index 1f04fcf0e5..b8ac6aae34 100644 --- a/test/simple/test-tcp-wrap-connect.js +++ b/test/simple/test-tcp-wrap-connect.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); var TCP = process.binding('tcp_wrap').TCP; diff --git a/test/simple/test-tcp-wrap-listen.js b/test/simple/test-tcp-wrap-listen.js index c9c51c5898..18c2c642d0 100644 --- a/test/simple/test-tcp-wrap-listen.js +++ b/test/simple/test-tcp-wrap-listen.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); diff --git a/test/simple/test-tcp-wrap.js b/test/simple/test-tcp-wrap.js index db11dd1c08..1e9e115a94 100644 --- a/test/simple/test-tcp-wrap.js +++ b/test/simple/test-tcp-wrap.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); diff --git a/test/simple/test-tty-wrap.js b/test/simple/test-tty-wrap.js index a41b75e1f1..da661c4018 100644 --- a/test/simple/test-tty-wrap.js +++ b/test/simple/test-tty-wrap.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); diff --git a/test/simple/test-vm-create-context-accessors.js b/test/simple/test-vm-create-context-accessors.js index 23fc935389..f0622245be 100644 --- a/test/simple/test-vm-create-context-accessors.js +++ b/test/simple/test-vm-create-context-accessors.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/simple/test-vm-create-context-circular-reference.js b/test/simple/test-vm-create-context-circular-reference.js index ae23eba167..ae5b48c81c 100644 --- a/test/simple/test-vm-create-context-circular-reference.js +++ b/test/simple/test-vm-create-context-circular-reference.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + var common = require('../common'); var assert = require('assert'); var vm = require('vm'); diff --git a/test/simple/test-writedouble.js b/test/simple/test-writedouble.js index 1d04974372..054161ba06 100644 --- a/test/simple/test-writedouble.js +++ b/test/simple/test-writedouble.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + /* * Tests to verify we're writing doubles correctly */ diff --git a/test/simple/test-writefloat.js b/test/simple/test-writefloat.js index 2a08667b44..5ec8fe71ab 100644 --- a/test/simple/test-writefloat.js +++ b/test/simple/test-writefloat.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + /* * Tests to verify we're writing floats correctly */ diff --git a/test/simple/test-writeint.js b/test/simple/test-writeint.js index eff92e06ea..9d2161bd11 100644 --- a/test/simple/test-writeint.js +++ b/test/simple/test-writeint.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + /* * Tests to verify we're writing signed integers correctly */ diff --git a/test/simple/test-writeuint.js b/test/simple/test-writeuint.js index a9c97e04c1..3e38cccc5d 100644 --- a/test/simple/test-writeuint.js +++ b/test/simple/test-writeuint.js @@ -1,3 +1,24 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + /* * A battery of tests to help us read a series of uints */ diff --git a/test/simple/test-zlib-random-byte-pipes.js b/test/simple/test-zlib-random-byte-pipes.js index f0e2e18fe1..ec5d7015e7 100644 --- a/test/simple/test-zlib-random-byte-pipes.js +++ b/test/simple/test-zlib-random-byte-pipes.js @@ -1,3 +1,23 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. var crypto = require('crypto'); var stream = require('stream'); From 7547c7df1a1d20ed194582f690076aa9c3bcc27b Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 6 Dec 2011 17:00:33 -0800 Subject: [PATCH 5/5] Deshadow, denamespace variables in node.cc Prep for isolates. --- src/node.cc | 74 +++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/src/node.cc b/src/node.cc index d0c540ff96..9830b1fb69 100644 --- a/src/node.cc +++ b/src/node.cc @@ -170,7 +170,7 @@ static void CheckStatus(uv_timer_t* watcher, int status); static void StartGCTimer () { if (!uv_is_active((uv_handle_t*) &gc_timer)) { - uv_timer_start(&node::gc_timer, node::CheckStatus, 5000, 5000); + uv_timer_start(&gc_timer, node::CheckStatus, 5000, 5000); } } @@ -213,7 +213,7 @@ static void Check(uv_check_t* watcher, int status) { // Otherwise start the gc! //fprintf(stderr, "start idle 2\n"); - uv_idle_start(&node::gc_idle, node::Idle); + uv_idle_start(&gc_idle, node::Idle); } @@ -821,10 +821,6 @@ Local UVException(int errorno, const char *syscall, const char *msg, const char *path) { - static Persistent syscall_symbol; - static Persistent errpath_symbol; - static Persistent code_symbol; - if (syscall_symbol.IsEmpty()) { syscall_symbol = NODE_PSYMBOL("syscall"); errno_symbol = NODE_PSYMBOL("errno"); @@ -1487,7 +1483,7 @@ static void CheckStatus(uv_timer_t* watcher, int status) { V8::GetHeapStatistics(&stats); if (stats.total_heap_size() > 1024 * 1024 * 128) { // larger than 128 megs, just start the idle watcher - uv_idle_start(&node::gc_idle, node::Idle); + uv_idle_start(&gc_idle, node::Idle); return; } } @@ -1498,7 +1494,7 @@ static void CheckStatus(uv_timer_t* watcher, int status) { if (d >= GC_WAIT_TIME - 1.) { //fprintf(stderr, "start idle\n"); - uv_idle_start(&node::gc_idle, node::Idle); + uv_idle_start(&gc_idle, node::Idle); } } @@ -2132,7 +2128,7 @@ static void SignalExit(int signal) { } -void Load(Handle process) { +void Load(Handle process_l) { // Compile, execute the src/node.js file. (Which was included as static C // string in node_natives.h. 'natve_node' is the string containing that // source code.) @@ -2162,7 +2158,7 @@ void Load(Handle process) { // Add a reference to the global object Local global = v8::Context::GetCurrent()->Global(); - Local args[1] = { Local::New(process) }; + Local args[1] = { Local::New(process_l) }; #ifdef HAVE_DTRACE InitDTrace(global); @@ -2429,7 +2425,7 @@ static Handle DebugProcess(const Arguments& args) { HandleScope scope; Handle rv = Undefined(); DWORD pid; - HANDLE process = NULL; + HANDLE process_l = NULL; HANDLE thread = NULL; HANDLE mapping = NULL; char mapping_name[32]; @@ -2442,12 +2438,12 @@ static Handle DebugProcess(const Arguments& args) { pid = (DWORD) args[0]->IntegerValue(); - process = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | + process_l = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ, FALSE, pid); - if (process == NULL) { + if (process_l == NULL) { rv = ThrowException(WinapiErrnoException(GetLastError(), "OpenProcess")); goto out; } @@ -2475,7 +2471,7 @@ static Handle DebugProcess(const Arguments& args) { goto out; } - thread = CreateRemoteThread(process, + thread = CreateRemoteThread(process_l, NULL, 0, *handler, @@ -2496,8 +2492,8 @@ static Handle DebugProcess(const Arguments& args) { } out: - if (process != NULL) { - CloseHandle(process); + if (process_l != NULL) { + CloseHandle(process_l); } if (thread != NULL) { CloseHandle(thread); @@ -2522,18 +2518,18 @@ char** Init(int argc, char *argv[]) { node::ParseArgs(argc, argv); // Parse the rest of the args (up to the 'option_end_index' (where '--' was // in the command line)) - int v8argc = node::option_end_index; + int v8argc = option_end_index; char **v8argv = argv; - if (node::debug_wait_connect) { + if (debug_wait_connect) { // v8argv is a copy of argv up to the script file argument +2 if --debug-brk // to expose the v8 debugger js object so that node.js can set // a breakpoint on the first line of the startup script v8argc += 2; v8argv = new char*[v8argc]; - memcpy(v8argv, argv, sizeof(argv) * node::option_end_index); - v8argv[node::option_end_index] = const_cast("--expose_debug_as"); - v8argv[node::option_end_index + 1] = const_cast("v8debug"); + memcpy(v8argv, argv, sizeof(argv) * option_end_index); + v8argv[option_end_index] = const_cast("--expose_debug_as"); + v8argv[option_end_index + 1] = const_cast("v8debug"); } // For the normal stack which moves from high to low addresses when frames @@ -2541,11 +2537,11 @@ char** Init(int argc, char *argv[]) { // the address of a stack variable (e.g. &stack_var) as an approximation // of the start of the stack (we're assuming that we haven't pushed a lot // of frames yet). - if (node::max_stack_size != 0) { + if (max_stack_size != 0) { uint32_t stack_var; ResourceConstraints constraints; - uint32_t *stack_limit = &stack_var - (node::max_stack_size / sizeof(uint32_t)); + uint32_t *stack_limit = &stack_var - (max_stack_size / sizeof(uint32_t)); constraints.set_stack_limit(stack_limit); SetResourceConstraints(&constraints); // Must be done before V8::Initialize } @@ -2558,25 +2554,25 @@ char** Init(int argc, char *argv[]) { RegisterSignalHandler(SIGTERM, SignalExit); #endif // __POSIX__ - uv_prepare_init(uv_default_loop(), &node::prepare_tick_watcher); - uv_prepare_start(&node::prepare_tick_watcher, PrepareTick); + uv_prepare_init(uv_default_loop(), &prepare_tick_watcher); + uv_prepare_start(&prepare_tick_watcher, PrepareTick); uv_unref(uv_default_loop()); - uv_check_init(uv_default_loop(), &node::check_tick_watcher); - uv_check_start(&node::check_tick_watcher, node::CheckTick); + uv_check_init(uv_default_loop(), &check_tick_watcher); + uv_check_start(&check_tick_watcher, node::CheckTick); uv_unref(uv_default_loop()); - uv_idle_init(uv_default_loop(), &node::tick_spinner); + uv_idle_init(uv_default_loop(), &tick_spinner); uv_unref(uv_default_loop()); - uv_check_init(uv_default_loop(), &node::gc_check); - uv_check_start(&node::gc_check, node::Check); + uv_check_init(uv_default_loop(), &gc_check); + uv_check_start(&gc_check, node::Check); uv_unref(uv_default_loop()); - uv_idle_init(uv_default_loop(), &node::gc_idle); + uv_idle_init(uv_default_loop(), &gc_idle); uv_unref(uv_default_loop()); - uv_timer_init(uv_default_loop(), &node::gc_timer); + uv_timer_init(uv_default_loop(), &gc_timer); uv_unref(uv_default_loop()); V8::SetFatalErrorHandler(node::OnFatalError); @@ -2600,7 +2596,7 @@ char** Init(int argc, char *argv[]) { node_isolate = Isolate::GetCurrent(); // If the --debug flag was specified then initialize the debug thread. - if (node::use_debug_agent) { + if (use_debug_agent) { EnableDebug(debug_wait_connect); } else { #ifdef _WIN32 @@ -2614,14 +2610,14 @@ char** Init(int argc, char *argv[]) { } -void EmitExit(v8::Handle process) { +void EmitExit(v8::Handle process_l) { // process.emit('exit') - Local emit_v = process->Get(String::New("emit")); + Local emit_v = process_l->Get(String::New("emit")); assert(emit_v->IsFunction()); Local emit = Local::Cast(emit_v); Local args[] = { String::New("exit") }; TryCatch try_catch; - emit->Call(process, 1, args); + emit->Call(process_l, 1, args); if (try_catch.HasCaught()) { FatalException(try_catch); } @@ -2639,12 +2635,12 @@ int Start(int argc, char *argv[]) { Persistent context = v8::Context::New(); v8::Context::Scope context_scope(context); - Handle process = SetupProcessObject(argc, argv); + Handle process_l = SetupProcessObject(argc, argv); v8_typed_array::AttachBindings(context->Global()); // Create all the objects, load modules, do everything. // so your next reading stop should be node::Load()! - Load(process); + Load(process_l); // All our arguments are loaded. We've evaluated all of the scripts. We // might even have created TCP servers. Now we enter the main eventloop. If @@ -2653,7 +2649,7 @@ int Start(int argc, char *argv[]) { // watchers, it blocks. uv_run(uv_default_loop()); - EmitExit(process); + EmitExit(process_l); #ifndef NDEBUG // Clean up.