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-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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 friend class JsEngine; | 119 friend class JsEngine; |
120 JsWeakValuesLists::const_iterator iterator; | 120 JsWeakValuesLists::const_iterator iterator; |
121 }; | 121 }; |
122 | 122 |
123 /** | 123 /** |
124 * Creates a new JavaScript engine instance. | 124 * Creates a new JavaScript engine instance. |
125 * @param appInfo Information about the app. | 125 * @param appInfo Information about the app. |
126 * @param timer Implementation of timer. | 126 * @param timer Implementation of timer. |
127 * @param fileSystem Implementation of filesystem. | 127 * @param fileSystem Implementation of filesystem. |
128 * @param webRequest Implementation of web request. | 128 * @param webRequest Implementation of web request. |
129 * @param isolate v8::Isolate wrapper. This parameter should be considered | |
130 * as a temporary hack for tests, it will go away. Issue #3593. | |
131 * @return New `JsEngine` instance. | 129 * @return New `JsEngine` instance. |
132 */ | 130 */ |
133 static JsEnginePtr New(const AppInfo& appInfo = AppInfo(), | 131 static JsEnginePtr New(const AppInfo& appInfo = AppInfo(), |
134 TimerPtr timer = CreateDefaultTimer(), | 132 TimerPtr timer = CreateDefaultTimer(), |
135 FileSystemPtr fileSystem = CreateDefaultFileSystem(), | 133 FileSystemPtr fileSystem = CreateDefaultFileSystem(), |
136 WebRequestPtr webRequest = CreateDefaultWebRequest()); | 134 WebRequestPtr webRequest = CreateDefaultWebRequest()); |
137 | 135 |
138 /** | 136 /** |
139 * Registers the callback function for an event. | 137 * Registers the callback function for an event. |
140 * @param eventName Event name. Note that this can be any string - it's a | 138 * @param eventName Event name. Note that this can be any string - it's a |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 std::mutex eventCallbacksMutex; | 336 std::mutex eventCallbacksMutex; |
339 JsWeakValuesLists jsWeakValuesLists; | 337 JsWeakValuesLists jsWeakValuesLists; |
340 std::mutex jsWeakValuesListsMutex; | 338 std::mutex jsWeakValuesListsMutex; |
341 TimerPtr timer; | 339 TimerPtr timer; |
342 WebRequestPtr webRequest; | 340 WebRequestPtr webRequest; |
343 WebRequestSharedPtr webRequestLegacy; | 341 WebRequestSharedPtr webRequestLegacy; |
344 }; | 342 }; |
345 } | 343 } |
346 | 344 |
347 #endif | 345 #endif |
OLD | NEW |