diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-07-05 14:40:13 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-07-05 14:51:29 -0700 |
commit | 149562555c9bf56457dee9a1ad70c53ed670a776 (patch) | |
tree | f6217cf3c54ddbee03f37247a3c7c75203f868fd /deps/v8/src/d8-posix.cc | |
parent | f08720606757577d95bd09b48697c7decbf17f00 (diff) | |
download | node-new-149562555c9bf56457dee9a1ad70c53ed670a776.tar.gz |
Downgrade V8 to 3.1.8.25
There are serious performance regressions both in V8 and our own legacy
networking stack. Until we correct our own problems we are going back to the
old V8.
Diffstat (limited to 'deps/v8/src/d8-posix.cc')
-rw-r--r-- | deps/v8/src/d8-posix.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/deps/v8/src/d8-posix.cc b/deps/v8/src/d8-posix.cc index 658fd4ff07..335bd2b4bc 100644 --- a/deps/v8/src/d8-posix.cc +++ b/deps/v8/src/d8-posix.cc @@ -311,6 +311,10 @@ static Handle<Value> GetStdout(int child_fd, int read_timeout, int total_timeout) { Handle<String> accumulator = String::Empty(); + const char* source = "(function(a, b) { return a + b; })"; + Handle<Value> cons_as_obj(Script::Compile(String::New(source))->Run()); + Handle<Function> cons_function(Function::Cast(*cons_as_obj)); + Handle<Value> cons_args[2]; int fullness = 0; static const int kStdoutReadBufferSize = 4096; @@ -346,7 +350,12 @@ static Handle<Value> GetStdout(int child_fd, bytes_read + fullness : LengthWithoutIncompleteUtf8(buffer, bytes_read + fullness); Handle<String> addition = String::New(buffer, length); - accumulator = String::Concat(accumulator, addition); + cons_args[0] = accumulator; + cons_args[1] = addition; + accumulator = Handle<String>::Cast(cons_function->Call( + Shell::utility_context()->Global(), + 2, + cons_args)); fullness = bytes_read + fullness - length; memcpy(buffer, buffer + length, fullness); } @@ -366,10 +375,8 @@ static Handle<Value> GetStdout(int child_fd, // a parent process hangs on waiting while a child process is already a zombie. // See http://code.google.com/p/v8/issues/detail?id=401. #if defined(WNOWAIT) && !defined(ANDROID) && !defined(__APPLE__) -#if !defined(__FreeBSD__) #define HAS_WAITID 1 #endif -#endif // Get exit status of child. |