| LEFT | RIGHT |
| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 params.push_back(shared_from_this()); | 127 params.push_back(shared_from_this()); |
| 128 JsValuePtr result = func->Call(params); | 128 JsValuePtr result = func->Call(params); |
| 129 return result->AsBool(); | 129 return result->AsBool(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 bool Subscription::operator==(const Subscription& subscription) const | 132 bool Subscription::operator==(const Subscription& subscription) const |
| 133 { | 133 { |
| 134 return GetProperty("url")->AsString() == subscription.GetProperty("url")->AsSt
ring(); | 134 return GetProperty("url")->AsString() == subscription.GetProperty("url")->AsSt
ring(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 FilterEngine::FilterEngine(JsEnginePtr jsEngine, | 137 FilterEngine::FilterEngine(JsEnginePtr jsEngine, |
| 138 const FilterEngine::Prefs& preconfiguredPrefs) | 138 const FilterEngine::Prefs& preconfiguredPrefs) |
| 139 : jsEngine(jsEngine), initialized(false), firstRun(false), updateCheckId(0) | 139 : jsEngine(jsEngine), initialized(false), firstRun(false), updateCheckId(0) |
| 140 { | 140 { |
| 141 jsEngine->SetEventCallback("_init", std::bind(&FilterEngine::InitDone, | 141 jsEngine->SetEventCallback("_init", std::bind(&FilterEngine::InitDone, |
| 142 this, std::placeholders::_1)); | 142 this, std::placeholders::_1)); |
| 143 | 143 |
| 144 { | 144 { |
| 145 // Lock the JS engine while we are loading scripts, no timeouts should fire | 145 // Lock the JS engine while we are loading scripts, no timeouts should fire |
| 146 // until we are done. | 146 // until we are done. |
| 147 const JsContext context(jsEngine); | 147 const JsContext context(jsEngine); |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 currentUrl, contentType, parentUrl); | 504 currentUrl, contentType, parentUrl); |
| 505 if (filter) | 505 if (filter) |
| 506 { | 506 { |
| 507 return filter; | 507 return filter; |
| 508 } | 508 } |
| 509 currentUrl = parentUrl; | 509 currentUrl = parentUrl; |
| 510 } | 510 } |
| 511 while (urlIterator != documentUrls.end()); | 511 while (urlIterator != documentUrls.end()); |
| 512 return FilterPtr(); | 512 return FilterPtr(); |
| 513 } | 513 } |
| LEFT | RIGHT |