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

Side by Side Diff: samples/process.cc

Issue 1292053002: Rework startup-data-util. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Same as Patch Set 3, but revert the "Test for all platforms" bits. Created 5 years, 4 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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 void PrintMap(map<string, string>* m) { 681 void PrintMap(map<string, string>* m) {
682 for (map<string, string>::iterator i = m->begin(); i != m->end(); i++) { 682 for (map<string, string>::iterator i = m->begin(); i != m->end(); i++) {
683 pair<string, string> entry = *i; 683 pair<string, string> entry = *i;
684 printf("%s: %s\n", entry.first.c_str(), entry.second.c_str()); 684 printf("%s: %s\n", entry.first.c_str(), entry.second.c_str());
685 } 685 }
686 } 686 }
687 687
688 688
689 int main(int argc, char* argv[]) { 689 int main(int argc, char* argv[]) {
690 v8::V8::InitializeICU(); 690 v8::V8::InitializeICU();
691 v8::V8::InitializeExternalStartupData(argv[0]);
691 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); 692 v8::Platform* platform = v8::platform::CreateDefaultPlatform();
692 v8::V8::InitializePlatform(platform); 693 v8::V8::InitializePlatform(platform);
693 v8::V8::Initialize(); 694 v8::V8::Initialize();
694 map<string, string> options; 695 map<string, string> options;
695 string file; 696 string file;
696 ParseOptions(argc, argv, &options, &file); 697 ParseOptions(argc, argv, &options, &file);
697 if (file.empty()) { 698 if (file.empty()) {
698 fprintf(stderr, "No script was specified.\n"); 699 fprintf(stderr, "No script was specified.\n");
699 return 1; 700 return 1;
700 } 701 }
(...skipping 11 matching lines...) Expand all
712 JsHttpRequestProcessor processor(isolate, source); 713 JsHttpRequestProcessor processor(isolate, source);
713 map<string, string> output; 714 map<string, string> output;
714 if (!processor.Initialize(&options, &output)) { 715 if (!processor.Initialize(&options, &output)) {
715 fprintf(stderr, "Error initializing processor.\n"); 716 fprintf(stderr, "Error initializing processor.\n");
716 return 1; 717 return 1;
717 } 718 }
718 if (!ProcessEntries(platform, &processor, kSampleSize, kSampleRequests)) 719 if (!ProcessEntries(platform, &processor, kSampleSize, kSampleRequests))
719 return 1; 720 return 1;
720 PrintMap(&output); 721 PrintMap(&output);
721 } 722 }
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