LEFT | RIGHT |
| 1 "use strict"; |
| 2 |
1 "Compiled from https://hg.adblockplus.org/adblockplus/ with Emscripten {{{EMSCRI
PTEN_VERSION}}}"; | 3 "Compiled from https://hg.adblockplus.org/adblockplus/ with Emscripten {{{EMSCRI
PTEN_VERSION}}}"; |
2 | 4 |
3 var FilterNotifier = require("filterNotifier").FilterNotifier; | 5 var FilterNotifier = require("filterNotifier").FilterNotifier; |
4 | 6 |
5 var regexps = | 7 var regexps = |
6 { | 8 { |
7 _data: Object.create(null), | 9 _data: Object.create(null), |
8 _counter: 0, | 10 _counter: 0, |
9 | 11 |
10 create: function(source, matchCase) | 12 create: function(source, matchCase) |
11 { | 13 { |
12 var id = ++this._counter; | 14 var id = ++this._counter; |
13 try | 15 try |
14 { | 16 { |
15 this._data[id] = new RegExp(getStringData(source), matchCase ? "" : "i"); | 17 this._data[id] = new RegExp(readString(source), matchCase ? "" : "i"); |
| 18 return id; |
16 } | 19 } |
17 catch (e) | 20 catch (e) |
18 { | 21 { |
19 this._data[id] = String(e); | |
20 } | |
21 return id; | |
22 }, | |
23 | |
24 getErrorLength: function(id) | |
25 { | |
26 if (typeof this._data[id] == "string") | |
27 return this._data[id].length; | |
28 else | |
29 return -1; | 22 return -1; |
30 }, | |
31 | |
32 getError: function(id, buffer) | |
33 { | |
34 if (typeof this._data[id] == "string") | |
35 { | |
36 copyString(this._data[id], buffer); | |
37 delete this._data[id]; | |
38 } | 23 } |
39 }, | 24 }, |
40 | 25 |
41 delete: function(id) | 26 delete: function(id) |
42 { | 27 { |
43 delete this._data[id]; | 28 delete this._data[id]; |
44 }, | 29 }, |
45 | 30 |
46 test: function(id, str) | 31 test: function(id, str) |
47 { | 32 { |
48 return this._data[id].test(getStringData(str)); | 33 return this._data[id].test(readString(str)); |
49 } | 34 } |
50 }; | 35 }; |
51 | 36 |
52 var Module = | 37 var Module = |
53 { | 38 { |
54 preRun: [], | 39 preRun: [], |
55 postRun: [], | 40 postRun: [], |
56 print: console.log.bind(console), | 41 print: console.log.bind(console), |
57 printErr: console.error.bind(console), | 42 printErr: console.error.bind(console), |
58 | 43 |
(...skipping 10 matching lines...) Expand all Loading... |
69 'total_memory': TOTAL_MEMORY | 54 'total_memory': TOTAL_MEMORY |
70 }; | 55 }; |
71 } | 56 } |
72 }; | 57 }; |
73 var ENVIRONMENT_IS_WEB = false, ENVIRONMENT_IS_NODE = false, | 58 var ENVIRONMENT_IS_WEB = false, ENVIRONMENT_IS_NODE = false, |
74 ENVIRONMENT_IS_WORKER = false, ENVIRONMENT_IS_SHELL = true; | 59 ENVIRONMENT_IS_WORKER = false, ENVIRONMENT_IS_SHELL = true; |
75 | 60 |
76 {{BODY}} | 61 {{BODY}} |
77 | 62 |
78 Object.assign(exports, Module); | 63 Object.assign(exports, Module); |
LEFT | RIGHT |