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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 * Returns a pointer to associated v8::Isolate. | 246 * Returns a pointer to associated v8::Isolate. |
247 */ | 247 */ |
248 v8::Isolate* GetIsolate() | 248 v8::Isolate* GetIsolate() |
249 { | 249 { |
250 return isolate->Get(); | 250 return isolate->Get(); |
251 } | 251 } |
252 | 252 |
253 private: | 253 private: |
254 explicit JsEngine(const ScopedV8IsolatePtr& isolate); | 254 explicit JsEngine(const ScopedV8IsolatePtr& isolate); |
255 | 255 |
| 256 JsValuePtr GetGlobalObject(); |
| 257 |
256 /// Isolate must be disposed only after disposing of all objects which are | 258 /// Isolate must be disposed only after disposing of all objects which are |
257 /// using it. | 259 /// using it. |
258 ScopedV8IsolatePtr isolate; | 260 ScopedV8IsolatePtr isolate; |
259 | 261 |
260 FileSystemPtr fileSystem; | 262 FileSystemPtr fileSystem; |
261 WebRequestPtr webRequest; | 263 WebRequestPtr webRequest; |
262 LogSystemPtr logSystem; | 264 LogSystemPtr logSystem; |
263 std::unique_ptr<v8::Persistent<v8::Context>> context; | 265 std::unique_ptr<v8::Persistent<v8::Context>> context; |
264 EventMap eventCallbacks; | 266 EventMap eventCallbacks; |
265 JsValuePtr globalJsObject; | |
266 }; | 267 }; |
267 } | 268 } |
268 | 269 |
269 #endif | 270 #endif |
OLD | NEW |