Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: src/d8-posix.cc

Issue 7219003: removed some unnecessary stuff from d8's initialization (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: corrected the behavior of when to launch interactive shell Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/d8.cc ('K') | « src/d8-debug.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8-posix.cc
diff --git a/src/d8-posix.cc b/src/d8-posix.cc
index a7a4049361cb1e0e6945136908d97da0a4bd9fa5..658fd4ff07206f016928c41d4953cedc471bd4a1 100644
--- a/src/d8-posix.cc
+++ b/src/d8-posix.cc
@@ -311,10 +311,6 @@ 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;
@@ -350,12 +346,7 @@ static Handle<Value> GetStdout(int child_fd,
bytes_read + fullness :
LengthWithoutIncompleteUtf8(buffer, bytes_read + fullness);
Handle<String> addition = String::New(buffer, length);
- cons_args[0] = accumulator;
- cons_args[1] = addition;
- accumulator = Handle<String>::Cast(cons_function->Call(
- Shell::utility_context()->Global(),
- 2,
- cons_args));
+ accumulator = String::Concat(accumulator, addition);
fullness = bytes_read + fullness - length;
memcpy(buffer, buffer + length, fullness);
}
« src/d8.cc ('K') | « src/d8-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698