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

Side by Side Diff: src/d8.cc

Issue 7459007: Fix for issue 1566: added flushing after writing to stdout. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 return true; 181 return true;
182 } 182 }
183 } 183 }
184 } 184 }
185 185
186 186
187 Handle<Value> Shell::Print(const Arguments& args) { 187 Handle<Value> Shell::Print(const Arguments& args) {
188 Handle<Value> val = Write(args); 188 Handle<Value> val = Write(args);
189 printf("\n"); 189 printf("\n");
190 fflush(stdout);
190 return val; 191 return val;
191 } 192 }
192 193
193 194
194 Handle<Value> Shell::Write(const Arguments& args) { 195 Handle<Value> Shell::Write(const Arguments& args) {
195 for (int i = 0; i < args.Length(); i++) { 196 for (int i = 0; i < args.Length(); i++) {
196 HandleScope handle_scope; 197 HandleScope handle_scope;
197 if (i != 0) { 198 if (i != 0) {
198 printf(" "); 199 printf(" ");
199 } 200 }
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 } 1281 }
1281 1282
1282 } // namespace v8 1283 } // namespace v8
1283 1284
1284 1285
1285 #ifndef GOOGLE3 1286 #ifndef GOOGLE3
1286 int main(int argc, char* argv[]) { 1287 int main(int argc, char* argv[]) {
1287 return v8::Shell::Main(argc, argv); 1288 return v8::Shell::Main(argc, argv);
1288 } 1289 }
1289 #endif 1290 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698