| OLD | NEW |
| 1 #ifndef ADBLOCKPLUS_JS_ENGINE_H | 1 #ifndef ADBLOCKPLUS_JS_ENGINE_H |
| 2 #define ADBLOCKPLUS_JS_ENGINE_H | 2 #define ADBLOCKPLUS_JS_ENGINE_H |
| 3 | 3 |
| 4 #include <stdexcept> | 4 #include <stdexcept> |
| 5 #include <string> | 5 #include <string> |
| 6 #include <v8.h> | 6 #include <v8.h> |
| 7 #include <AdblockPlus/JsValue.h> | 7 #include <AdblockPlus/JsValue.h> |
| 8 | 8 |
| 9 namespace AdblockPlus | 9 namespace AdblockPlus |
| 10 { | 10 { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 JsValuePtr NewValue(bool val); | 36 JsValuePtr NewValue(bool val); |
| 37 inline JsValuePtr NewValue(const char* val) | 37 inline JsValuePtr NewValue(const char* val) |
| 38 { | 38 { |
| 39 return NewValue(std::string(val)); | 39 return NewValue(std::string(val)); |
| 40 } | 40 } |
| 41 inline JsValuePtr NewValue(int val) | 41 inline JsValuePtr NewValue(int val) |
| 42 { | 42 { |
| 43 return NewValue(static_cast<int64_t>(val)); | 43 return NewValue(static_cast<int64_t>(val)); |
| 44 } | 44 } |
| 45 JsValuePtr NewObject(); | 45 JsValuePtr NewObject(); |
| 46 JsValuePtr NewCallback(v8::InvocationCallback callback); |
| 46 static JsEngine& FromArguments(const v8::Arguments& arguments); | 47 static JsEngine& FromArguments(const v8::Arguments& arguments); |
| 47 JsValueList ConvertArguments(const v8::Arguments& arguments); | 48 JsValueList ConvertArguments(const v8::Arguments& arguments); |
| 48 | 49 |
| 49 inline FileSystem& GetFileSystem() | 50 inline FileSystem& GetFileSystem() |
| 50 { | 51 { |
| 51 return fileSystem; | 52 return fileSystem; |
| 52 } | 53 } |
| 53 inline WebRequest& GetWebRequest() | 54 inline WebRequest& GetWebRequest() |
| 54 { | 55 { |
| 55 return webRequest; | 56 return webRequest; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 74 private: | 75 private: |
| 75 FileSystem& fileSystem; | 76 FileSystem& fileSystem; |
| 76 WebRequest& webRequest; | 77 WebRequest& webRequest; |
| 77 ErrorCallback& errorCallback; | 78 ErrorCallback& errorCallback; |
| 78 v8::Isolate* isolate; | 79 v8::Isolate* isolate; |
| 79 v8::Persistent<v8::Context> context; | 80 v8::Persistent<v8::Context> context; |
| 80 }; | 81 }; |
| 81 } | 82 } |
| 82 | 83 |
| 83 #endif | 84 #endif |
| OLD | NEW |