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

Side by Side Diff: samples/process.cc

Issue 1314863002: Version 4.5.103.27 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.5
Patch Set: Created 5 years, 3 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
« no previous file with comments | « samples/hello-world.cc ('k') | samples/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 void PrintMap(map<string, string>* m) { 679 void PrintMap(map<string, string>* m) {
680 for (map<string, string>::iterator i = m->begin(); i != m->end(); i++) { 680 for (map<string, string>::iterator i = m->begin(); i != m->end(); i++) {
681 pair<string, string> entry = *i; 681 pair<string, string> entry = *i;
682 printf("%s: %s\n", entry.first.c_str(), entry.second.c_str()); 682 printf("%s: %s\n", entry.first.c_str(), entry.second.c_str());
683 } 683 }
684 } 684 }
685 685
686 686
687 int main(int argc, char* argv[]) { 687 int main(int argc, char* argv[]) {
688 v8::V8::InitializeICU(); 688 v8::V8::InitializeICU();
689 v8::V8::InitializeExternalStartupData(argv[0]);
689 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); 690 v8::Platform* platform = v8::platform::CreateDefaultPlatform();
690 v8::V8::InitializePlatform(platform); 691 v8::V8::InitializePlatform(platform);
691 v8::V8::Initialize(); 692 v8::V8::Initialize();
692 map<string, string> options; 693 map<string, string> options;
693 string file; 694 string file;
694 ParseOptions(argc, argv, &options, &file); 695 ParseOptions(argc, argv, &options, &file);
695 if (file.empty()) { 696 if (file.empty()) {
696 fprintf(stderr, "No script was specified.\n"); 697 fprintf(stderr, "No script was specified.\n");
697 return 1; 698 return 1;
698 } 699 }
(...skipping 11 matching lines...) Expand all
710 JsHttpRequestProcessor processor(isolate, source); 711 JsHttpRequestProcessor processor(isolate, source);
711 map<string, string> output; 712 map<string, string> output;
712 if (!processor.Initialize(&options, &output)) { 713 if (!processor.Initialize(&options, &output)) {
713 fprintf(stderr, "Error initializing processor.\n"); 714 fprintf(stderr, "Error initializing processor.\n");
714 return 1; 715 return 1;
715 } 716 }
716 if (!ProcessEntries(&processor, kSampleSize, kSampleRequests)) 717 if (!ProcessEntries(&processor, kSampleSize, kSampleRequests))
717 return 1; 718 return 1;
718 PrintMap(&output); 719 PrintMap(&output);
719 } 720 }
OLDNEW
« no previous file with comments | « samples/hello-world.cc ('k') | samples/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698