| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 275     struct TimerTaskInfo | 275     struct TimerTaskInfo | 
| 276     { | 276     { | 
| 277       ~TimerTaskInfo(); | 277       ~TimerTaskInfo(); | 
| 278       int delay; | 278       int delay; | 
| 279       std::vector<std::unique_ptr<v8::Persistent<v8::Value>>> arguments; | 279       std::vector<std::unique_ptr<v8::Persistent<v8::Value>>> arguments; | 
| 280     }; | 280     }; | 
| 281     typedef std::list<TimerTaskInfo> TimerTaskInfos; | 281     typedef std::list<TimerTaskInfo> TimerTaskInfos; | 
| 282     struct TimerTask | 282     struct TimerTask | 
| 283     { | 283     { | 
| 284       std::weak_ptr<JsEngine> weakJsEngine; | 284       std::weak_ptr<JsEngine> weakJsEngine; | 
| 285       TimerTaskInfos::const_iterator taskInfoIterator; | 285       TimerTaskInfos::iterator taskInfoIterator; | 
| 286     }; | 286     }; | 
| 287     TimerTask CreateTimerTask(const v8::Arguments& arguments); | 287     TimerTask CreateTimerTask(const v8::Arguments& arguments); | 
| 288     void CallTimerTask(TimerTaskInfos::const_iterator taskInfoIterator); | 288     void CallTimerTask(TimerTaskInfos::iterator taskInfoIterator); | 
| 289   private: | 289   private: | 
| 290     explicit JsEngine(const ScopedV8IsolatePtr& isolate); | 290     explicit JsEngine(const ScopedV8IsolatePtr& isolate); | 
| 291 | 291 | 
| 292     JsValuePtr GetGlobalObject(); | 292     JsValuePtr GetGlobalObject(); | 
| 293 | 293 | 
| 294     /// Isolate must be disposed only after disposing of all objects which are | 294     /// Isolate must be disposed only after disposing of all objects which are | 
| 295     /// using it. | 295     /// using it. | 
| 296     ScopedV8IsolatePtr isolate; | 296     ScopedV8IsolatePtr isolate; | 
| 297 | 297 | 
| 298     FileSystemPtr fileSystem; | 298     FileSystemPtr fileSystem; | 
| 299     WebRequestPtr webRequest; | 299     WebRequestPtr webRequest; | 
| 300     LogSystemPtr logSystem; | 300     LogSystemPtr logSystem; | 
| 301     std::unique_ptr<v8::Persistent<v8::Context>> context; | 301     std::unique_ptr<v8::Persistent<v8::Context>> context; | 
| 302     EventMap eventCallbacks; | 302     EventMap eventCallbacks; | 
| 303     std::mutex eventCallbacksMutex; | 303     std::mutex eventCallbacksMutex; | 
| 304     std::mutex isConnectionAllowedMutex; | 304     std::mutex isConnectionAllowedMutex; | 
| 305     IsConnectionAllowedCallback isConnectionAllowed; | 305     IsConnectionAllowedCallback isConnectionAllowed; | 
| 306     TimerTaskInfos timerTaskInfos; | 306     TimerTaskInfos timerTaskInfos; | 
| 307   }; | 307   }; | 
| 308 } | 308 } | 
| 309 | 309 | 
| 310 #endif | 310 #endif | 
| OLD | NEW | 
|---|