| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 12 matching lines...) Expand all Loading... |
| 23 #include <stdint.h> | 23 #include <stdint.h> |
| 24 #include <string> | 24 #include <string> |
| 25 #include <AdblockPlus/AppInfo.h> | 25 #include <AdblockPlus/AppInfo.h> |
| 26 #include <AdblockPlus/tr1_functional.h> | 26 #include <AdblockPlus/tr1_functional.h> |
| 27 #include <AdblockPlus/LogSystem.h> | 27 #include <AdblockPlus/LogSystem.h> |
| 28 #include <AdblockPlus/FileSystem.h> | 28 #include <AdblockPlus/FileSystem.h> |
| 29 #include <AdblockPlus/JsValue.h> | 29 #include <AdblockPlus/JsValue.h> |
| 30 #include <AdblockPlus/WebRequest.h> | 30 #include <AdblockPlus/WebRequest.h> |
| 31 | 31 |
| 32 #include "tr1_memory.h" | 32 #include "tr1_memory.h" |
| 33 #include "V8ValueHolder.h" | |
| 34 | 33 |
| 35 namespace v8 | 34 namespace v8 |
| 36 { | 35 { |
| 37 class Arguments; | 36 class Arguments; |
| 38 class Isolate; | 37 class Isolate; |
| 39 class Value; | 38 class Value; |
| 40 class Context; | 39 class Context; |
| 41 template<class T> class Handle; | 40 template<class T> class Handle; |
| 42 typedef Handle<Value>(*InvocationCallback)(const Arguments &args); | 41 typedef Handle<Value>(*InvocationCallback)(const Arguments &args); |
| 43 } | 42 } |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 */ | 217 */ |
| 219 void SetGlobalProperty(const std::string& name, AdblockPlus::JsValuePtr valu
e); | 218 void SetGlobalProperty(const std::string& name, AdblockPlus::JsValuePtr valu
e); |
| 220 | 219 |
| 221 private: | 220 private: |
| 222 JsEngine(); | 221 JsEngine(); |
| 223 | 222 |
| 224 FileSystemPtr fileSystem; | 223 FileSystemPtr fileSystem; |
| 225 WebRequestPtr webRequest; | 224 WebRequestPtr webRequest; |
| 226 LogSystemPtr logSystem; | 225 LogSystemPtr logSystem; |
| 227 v8::Isolate* isolate; | 226 v8::Isolate* isolate; |
| 228 V8ValueHolder<v8::Context> context; | 227 std::unique_ptr<v8::Persistent<v8::Context>> context; |
| 229 EventMap eventCallbacks; | 228 EventMap eventCallbacks; |
| 230 JsValuePtr globalJsObject; | 229 JsValuePtr globalJsObject; |
| 231 }; | 230 }; |
| 232 } | 231 } |
| 233 | 232 |
| 234 #endif | 233 #endif |
| OLD | NEW |