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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 Subscription::Subscription(JsValue&& value) | 90 Subscription::Subscription(JsValue&& value) |
91 : JsValue(std::move(value)) | 91 : JsValue(std::move(value)) |
92 { | 92 { |
93 if (!IsObject()) | 93 if (!IsObject()) |
94 throw std::runtime_error("JavaScript value is not an object"); | 94 throw std::runtime_error("JavaScript value is not an object"); |
95 } | 95 } |
96 | 96 |
97 Subscription& Subscription::operator=(const Subscription& src) | 97 Subscription& Subscription::operator=(const Subscription& src) |
98 { | 98 { |
99 *this = src; | 99 static_cast<JsValue&>(*this) = src; |
100 return *this; | 100 return *this; |
101 } | 101 } |
102 | 102 |
103 Subscription& Subscription::operator=(Subscription&& src) | 103 Subscription& Subscription::operator=(Subscription&& src) |
104 { | 104 { |
105 *this = std::move(src); | 105 static_cast<JsValue&>(*this) = std::move(src); |
106 return *this; | 106 return *this; |
107 } | 107 } |
108 | 108 |
109 bool Subscription::IsListed() const | 109 bool Subscription::IsListed() const |
110 { | 110 { |
111 JsValue func = jsEngine->Evaluate("API.isListedSubscription"); | 111 JsValue func = jsEngine->Evaluate("API.isListedSubscription"); |
112 return func.Call(*this).AsBool(); | 112 return func.Call(*this).AsBool(); |
113 } | 113 } |
114 | 114 |
115 void Subscription::AddToList() | 115 void Subscription::AddToList() |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 FilterPtr filter = GetWhitelistingFilter(currentUrl, contentTypeMask, parent
Url); | 595 FilterPtr filter = GetWhitelistingFilter(currentUrl, contentTypeMask, parent
Url); |
596 if (filter) | 596 if (filter) |
597 { | 597 { |
598 return filter; | 598 return filter; |
599 } | 599 } |
600 currentUrl = parentUrl; | 600 currentUrl = parentUrl; |
601 } | 601 } |
602 while (urlIterator != documentUrls.end()); | 602 while (urlIterator != documentUrls.end()); |
603 return FilterPtr(); | 603 return FilterPtr(); |
604 } | 604 } |
LEFT | RIGHT |