| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 * Stores `JsValue`s in a way they don't keep a strong reference to | 224 * Stores `JsValue`s in a way they don't keep a strong reference to |
| 225 * `JsEngine` and which are destroyed when `JsEngine` is destroyed. These | 225 * `JsEngine` and which are destroyed when `JsEngine` is destroyed. These |
| 226 * methods should be used when one needs to carry a JsValue in a callback | 226 * methods should be used when one needs to carry a JsValue in a callback |
| 227 * directly or indirectly passed to `JsEngine`. | 227 * directly or indirectly passed to `JsEngine`. |
| 228 * The method is thread-safe. | 228 * The method is thread-safe. |
| 229 * @param `JsValueList` to store. | 229 * @param `JsValueList` to store. |
| 230 * @return `JsWeakValuesID` of stored values which allows to restore them | 230 * @return `JsWeakValuesID` of stored values which allows to restore them |
| 231 * later. | 231 * later. |
| 232 */ | 232 */ |
| 233 JsWeakValuesID StoreJsValues(const JsValueList& values); | 233 JsWeakValuesID StoreJsValues(const JsValueList& values); |
| 234 |
| 234 /** | 235 /** |
| 235 * Extracts and removes from `JsEngine` earlier stored `JsValue`s. | 236 * Extracts and removes from `JsEngine` earlier stored `JsValue`s. |
| 236 * The method is thread-safe. | 237 * The method is thread-safe. |
| 237 * @param id `JsWeakValuesID` of values. | 238 * @param id `JsWeakValuesID` of values. |
| 238 * @return `JsValueList` of stored values. | 239 * @return `JsValueList` of stored values. |
| 239 */ | 240 */ |
| 240 JsValueList TakeJsValues(const JsWeakValuesID& id); | 241 JsValueList TakeJsValues(const JsWeakValuesID& id); |
| 241 | 242 |
| 242 /* | 243 /* |
| 243 * Private functionality required to implement timers. | 244 * Private functionality required to implement timers. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 std::mutex eventCallbacksMutex; | 342 std::mutex eventCallbacksMutex; |
| 342 mutable std::mutex isConnectionAllowedMutex; | 343 mutable std::mutex isConnectionAllowedMutex; |
| 343 IsConnectionAllowedCallback isConnectionAllowed; | 344 IsConnectionAllowedCallback isConnectionAllowed; |
| 344 JsWeakValuesLists jsWeakValuesLists; | 345 JsWeakValuesLists jsWeakValuesLists; |
| 345 std::mutex jsWeakValuesListsMutex; | 346 std::mutex jsWeakValuesListsMutex; |
| 346 TimerPtr timer; | 347 TimerPtr timer; |
| 347 }; | 348 }; |
| 348 } | 349 } |
| 349 | 350 |
| 350 #endif | 351 #endif |
| LEFT | RIGHT |