| 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-2016 Eyeo GmbH | 3  * Copyright (C) 2006-2016 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 22 matching lines...) Expand all  Loading... | 
| 33 namespace v8 | 33 namespace v8 | 
| 34 { | 34 { | 
| 35   class Arguments; | 35   class Arguments; | 
| 36   class Isolate; | 36   class Isolate; | 
| 37   class Value; | 37   class Value; | 
| 38   class Context; | 38   class Context; | 
| 39   template<class T> class Handle; | 39   template<class T> class Handle; | 
| 40   typedef Handle<Value>(*InvocationCallback)(const Arguments &args); | 40   typedef Handle<Value>(*InvocationCallback)(const Arguments &args); | 
| 41 } | 41 } | 
| 42 | 42 | 
|  | 43 /* | 
|  | 44  * Forward declaration of internally-defined implementation class | 
|  | 45  */ | 
|  | 46 class JsEngineInternal; | 
|  | 47 | 
| 43 namespace AdblockPlus | 48 namespace AdblockPlus | 
| 44 { | 49 { | 
| 45   class JsEngine; | 50   class JsEngine; | 
| 46 | 51 | 
| 47   /** | 52   /** | 
| 48    * Shared smart pointer to a `JsEngine` instance. | 53    * Shared smart pointer to a `JsEngine` instance. | 
| 49    */ | 54    */ | 
| 50   typedef std::shared_ptr<JsEngine> JsEnginePtr; | 55   typedef std::shared_ptr<JsEngine> JsEnginePtr; | 
| 51 | 56 | 
| 52   /** | 57   /** | 
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 274     explicit JsEngine(const ScopedV8IsolatePtr& isolate); | 279     explicit JsEngine(const ScopedV8IsolatePtr& isolate); | 
| 275 | 280 | 
| 276     /** | 281     /** | 
| 277      * Retrieve the global object as a JsValuePtr | 282      * Retrieve the global object as a JsValuePtr | 
| 278      * | 283      * | 
| 279      * \par Precondition | 284      * \par Precondition | 
| 280      * - Requires a v8 execution scope already present | 285      * - Requires a v8 execution scope already present | 
| 281      */ | 286      */ | 
| 282     JsValuePtr GetGlobalObject(); | 287     JsValuePtr GetGlobalObject(); | 
| 283 | 288 | 
|  | 289     /** | 
|  | 290      * Provide a reference to this object in its type as constructed. | 
|  | 291      * Objects of this type are only ever constructed as `JsEngineInternal`. | 
|  | 292      */ | 
|  | 293     JsEngineInternal& Internal(); | 
|  | 294 | 
| 284     /// Isolate must be disposed only after disposing of all objects which are | 295     /// Isolate must be disposed only after disposing of all objects which are | 
| 285     /// using it. | 296     /// using it. | 
| 286     ScopedV8IsolatePtr isolate; | 297     ScopedV8IsolatePtr isolate; | 
| 287 | 298 | 
| 288     FileSystemPtr fileSystem; | 299     FileSystemPtr fileSystem; | 
| 289     WebRequestPtr webRequest; | 300     WebRequestPtr webRequest; | 
| 290     LogSystemPtr logSystem; | 301     LogSystemPtr logSystem; | 
| 291     EventMap eventCallbacks; |  | 
| 292 | 302 | 
| 293     // Forward declaration for PImpl idiom | 303     // Forward declaration for PImpl idiom | 
| 294     class SchedulerImpl; | 304     class SchedulerImpl; | 
| 295     /** | 305     /** | 
| 296      * Scheduler for tasks executed under the current engine. | 306      * Scheduler for tasks executed under the current engine. | 
| 297      * | 307      * | 
| 298      * \par Invariant | 308      * \par Invariant | 
| 299      *   `bool(scheduler)` is always true | 309      *   `bool(scheduler)` is always true | 
| 300      */ | 310      */ | 
| 301     std::unique_ptr<SchedulerImpl> scheduler; | 311     std::unique_ptr<SchedulerImpl> scheduler; | 
| 302   }; | 312   }; | 
| 303 } | 313 } | 
| 304 | 314 | 
| 305 #endif | 315 #endif | 
| OLD | NEW | 
|---|