Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: shell/src/Main.cpp

Issue 9846017: Make JavaScript sources compile into the library; convert JavaScript files on the fly (Closed)
Left Patch Set: Split various fake modules out of the large compat script Created March 14, 2013, 10:24 p.m.
Right Patch Set: Review comments addressed Created March 15, 2013, 3:59 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « libadblockplus.gyp ('k') | src/JsEngine.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 #include <AdblockPlus.h> 1 #include <AdblockPlus.h>
2 #include <fstream> 2 #include <fstream>
3 #include <iostream> 3 #include <iostream>
4 #include <sstream> 4 #include <sstream>
5 5
6 #include "GcCommand.h" 6 #include "GcCommand.h"
7 #include "HelpCommand.h" 7 #include "HelpCommand.h"
8 #include "SubscriptionsCommand.h" 8 #include "SubscriptionsCommand.h"
9 #include "MatchesCommand.h" 9 #include "MatchesCommand.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 } 54 }
55 55
56 int main() 56 int main()
57 { 57 {
58 try 58 try
59 { 59 {
60 LibFileReader fileReader; 60 LibFileReader fileReader;
61 CerrErrorCallback errorCallback; 61 CerrErrorCallback errorCallback;
62 AdblockPlus::JsEngine jsEngine(&fileReader, 0); 62 AdblockPlus::JsEngine jsEngine(&fileReader, 0);
63 jsEngine.Load("adblockplus_compat.js");
64 jsEngine.Load("adblockplus.js");
65 63
66 CommandMap commands; 64 CommandMap commands;
67 Add(commands, new GcCommand(jsEngine)); 65 Add(commands, new GcCommand(jsEngine));
68 Add(commands, new HelpCommand(commands)); 66 Add(commands, new HelpCommand(commands));
69 Add(commands, new SubscriptionsCommand(jsEngine)); 67 Add(commands, new SubscriptionsCommand(jsEngine));
70 Add(commands, new MatchesCommand()); 68 Add(commands, new MatchesCommand());
71 69
72 std::string commandLine; 70 std::string commandLine;
73 while (ReadCommandLine(commandLine)) 71 while (ReadCommandLine(commandLine))
74 { 72 {
(...skipping 13 matching lines...) Expand all
88 std::cout << error.what() << std::endl; 86 std::cout << error.what() << std::endl;
89 } 87 }
90 } 88 }
91 } 89 }
92 catch (const std::exception& e) 90 catch (const std::exception& e)
93 { 91 {
94 std::cerr << "Exception: " << e.what() << std::endl; 92 std::cerr << "Exception: " << e.what() << std::endl;
95 } 93 }
96 return 0; 94 return 0;
97 } 95 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld