OLD | NEW |
1 | 1 |
2 #if !defined(ADBLOCK_PLUS_JS_ENGINE_INTERNAL_H) | 2 #if !defined(ADBLOCK_PLUS_JS_ENGINE_INTERNAL_H) |
3 #define ADBLOCK_PLUS_JS_ENGINE_INTERNAL_H | 3 #define ADBLOCK_PLUS_JS_ENGINE_INTERNAL_H |
4 | 4 |
5 #include <AdblockPlus/JsEngine.h> | 5 #include <AdblockPlus/JsEngine.h> |
6 #include <v8.h> | 6 #include <v8.h> |
7 #include <array> | 7 #include <array> |
8 #include "AllocatedArray.h" | 8 #include "AllocatedArray.h" |
9 #include "Scheduler.h" | 9 #include "Scheduler.h" |
10 #include "V8Upgrade.h" | 10 #include "V8Upgrade.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 * to allocate a shared pointer to the task. | 87 * to allocate a shared pointer to the task. |
88 * | 88 * |
89 * @param task | 89 * @param task |
90 * Task to execute. All v8 handles must refer to the present engine. | 90 * Task to execute. All v8 handles must refer to the present engine. |
91 * @param ImmediateSingleUseThreadType | 91 * @param ImmediateSingleUseThreadType |
92 * The schedule policy--create a new thread and discard it afterwards. | 92 * The schedule policy--create a new thread and discard it afterwards. |
93 */ | 93 */ |
94 void ScheduleTaskInternal(std::shared_ptr<TaskFunctionInterface>&& body); | 94 void ScheduleTaskInternal(std::shared_ptr<TaskFunctionInterface>&& body); |
95 | 95 |
96 public: | 96 public: |
97 JsEngineInternal(const AdblockPlus::ScopedV8IsolatePtr& isolate); | 97 JsEngineInternal(v8::Isolate* isolate); |
98 | 98 |
99 /** | 99 /** |
100 * Retrieve our persistent v8 context as a local handle. | 100 * Retrieve our persistent v8 context as a local handle. |
101 */ | 101 */ |
102 v8::Local<v8::Context> GetContextAsLocal() const; | 102 v8::Local<v8::Context> GetContextAsLocal() const; |
103 | 103 |
104 /** | 104 /** |
105 * Retrieve the global object of our context. | 105 * Retrieve the global object of our context. |
106 */ | 106 */ |
107 v8::Local<v8::Object> GetGlobalObject(); | 107 v8::Local<v8::Object> GetGlobalObject(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 */ | 234 */ |
235 const v8::HandleScope handleScope; | 235 const v8::HandleScope handleScope; |
236 const v8::Context::Scope contextScope; | 236 const v8::Context::Scope contextScope; |
237 public: | 237 public: |
238 V8ExecutionScope(JsEngineInternal* engine); | 238 V8ExecutionScope(JsEngineInternal* engine); |
239 }; | 239 }; |
240 | 240 |
241 | 241 |
242 | 242 |
243 #endif | 243 #endif |
OLD | NEW |