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

Side by Side Diff: compiled/library.js

Issue 29426559: Issue 5137 - [emscripten] Added basic filter storage implementation (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Fixed bogus assert Created Aug. 31, 2017, 12:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compiled/library.h ('k') | compiled/storage/FilterStorage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 25 matching lines...) Expand all
36 LogError: function(str) 36 LogError: function(str)
37 { 37 {
38 console.error(new Error(readString(str)).stack); 38 console.error(new Error(readString(str)).stack);
39 }, 39 },
40 40
41 CharToLower: function(charCode) 41 CharToLower: function(charCode)
42 { 42 {
43 return String.fromCharCode(charCode).toLowerCase().charCodeAt(0); 43 return String.fromCharCode(charCode).toLowerCase().charCodeAt(0);
44 }, 44 },
45 45
46 JSNotifyFilterChange: function(topic, filter) 46 JSNotifyFilterChange: function(topic, filter, subscription, position)
47 { 47 {
48 if (subscription)
49 subscription = exports.Subscription.fromPointer(subscription);
48 FilterNotifier.triggerListeners(notifierTopics.get(topic), 50 FilterNotifier.triggerListeners(notifierTopics.get(topic),
49 exports.Filter.fromPointer(filter)); 51 exports.Filter.fromPointer(filter), subscription, position);
50 }, 52 },
51 53
52 JSNotifySubscriptionChange: function(topic, subscription) 54 JSNotifySubscriptionChange: function(topic, subscription)
53 { 55 {
54 FilterNotifier.triggerListeners(notifierTopics.get(topic), 56 FilterNotifier.triggerListeners(notifierTopics.get(topic),
55 exports.Subscription.fromPointer(subscription)); 57 exports.Subscription.fromPointer(subscription));
56 }, 58 },
57 59
58 $_regexp_data: Object.create(null), 60 $_regexp_data: Object.create(null),
59 $_regexp_counter: 0, 61 $_regexp_counter: 0,
(...skipping 18 matching lines...) Expand all
78 { 80 {
79 delete _regexp_data[id]; 81 delete _regexp_data[id];
80 }, 82 },
81 83
82 TestRegExp__deps: ["$_regexp_data"], 84 TestRegExp__deps: ["$_regexp_data"],
83 TestRegExp: function(id, str) 85 TestRegExp: function(id, str)
84 { 86 {
85 return _regexp_data[id].test(readString(str)); 87 return _regexp_data[id].test(readString(str));
86 } 88 }
87 }); 89 });
OLDNEW
« no previous file with comments | « compiled/library.h ('k') | compiled/storage/FilterStorage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld