OLD | NEW |
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 JsWeakValuesID StoreJsValues(const JsValueList& values); | 211 JsWeakValuesID StoreJsValues(const JsValueList& values); |
212 | 212 |
213 /** | 213 /** |
214 * Extracts and removes from `JsEngine` earlier stored `JsValue`s. | 214 * Extracts and removes from `JsEngine` earlier stored `JsValue`s. |
215 * The method is thread-safe. | 215 * The method is thread-safe. |
216 * @param id `JsWeakValuesID` of values. | 216 * @param id `JsWeakValuesID` of values. |
217 * @return `JsValueList` of stored values. | 217 * @return `JsValueList` of stored values. |
218 */ | 218 */ |
219 JsValueList TakeJsValues(const JsWeakValuesID& id); | 219 JsValueList TakeJsValues(const JsWeakValuesID& id); |
220 | 220 |
| 221 /** |
| 222 * Extracts earlier stored `JsValue`s from `JsEgnine` but does not remove |
| 223 * them, one still must call `TakeJsValues`. |
| 224 * @param id `JsWeakValuesID` of values. |
| 225 * @return `JsValueList` of stored values. |
| 226 */ |
| 227 JsValueList GetJsValues(const JsWeakValuesID& id); |
| 228 |
221 /* | 229 /* |
222 * Private functionality required to implement timers. | 230 * Private functionality required to implement timers. |
223 * @param arguments `v8::FunctionCallbackInfo` is the arguments received in
C++ | 231 * @param arguments `v8::FunctionCallbackInfo` is the arguments received in
C++ |
224 * callback associated for global setTimeout method. | 232 * callback associated for global setTimeout method. |
225 */ | 233 */ |
226 static void ScheduleTimer(const v8::FunctionCallbackInfo<v8::Value>& argumen
ts); | 234 static void ScheduleTimer(const v8::FunctionCallbackInfo<v8::Value>& argumen
ts); |
227 | 235 |
228 /* | 236 /* |
229 * Private functionality required to implement web requests. | 237 * Private functionality required to implement web requests. |
230 * @param arguments `v8::FunctionCallbackInfo` is the arguments received in
C++ | 238 * @param arguments `v8::FunctionCallbackInfo` is the arguments received in
C++ |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 290 |
283 std::unique_ptr<v8::Global<v8::Context>> context; | 291 std::unique_ptr<v8::Global<v8::Context>> context; |
284 EventMap eventCallbacks; | 292 EventMap eventCallbacks; |
285 std::mutex eventCallbacksMutex; | 293 std::mutex eventCallbacksMutex; |
286 JsWeakValuesLists jsWeakValuesLists; | 294 JsWeakValuesLists jsWeakValuesLists; |
287 std::mutex jsWeakValuesListsMutex; | 295 std::mutex jsWeakValuesListsMutex; |
288 }; | 296 }; |
289 } | 297 } |
290 | 298 |
291 #endif | 299 #endif |
OLD | NEW |