| 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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 #include <vector> | 18 #include <vector> |
| 19 #include <stdexcept> | 19 #include <stdexcept> |
| 20 | 20 |
| 21 #include <AdblockPlus/JsValue.h> | 21 #include <AdblockPlus/JsValue.h> |
| 22 | 22 |
| 23 #include "AppInfoJsObject.h" | 23 #include "AppInfoJsObject.h" |
| 24 #include "ConsoleJsObject.h" | 24 #include "ConsoleJsObject.h" |
| 25 #include "FileSystemJsObject.h" | 25 #include "FileSystemJsObject.h" |
| 26 #include "GlobalJsObject.h" | 26 #include "GlobalJsObject.h" |
| 27 #include "ConsoleJsObject.h" | 27 #include "ConsoleJsObject.h" |
| 28 #include "WebRequestJsObject.h" | 28 #include "WebRequestJsObject.h" |
| 29 #include "Thread.h" | |
| 30 #include "Utils.h" | 29 #include "Utils.h" |
| 31 | 30 |
| 32 using namespace AdblockPlus; | 31 using namespace AdblockPlus; |
| 33 | 32 |
| 34 namespace | 33 namespace |
| 35 { | 34 { |
| 36 void SetTimeoutCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments) | 35 void SetTimeoutCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments) |
| 37 { | 36 { |
| 38 try | 37 try |
| 39 { | 38 { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 auto value = jsEngine.NewObject(); | 72 auto value = jsEngine.NewObject(); |
| 74 obj.SetProperty("_fileSystem", FileSystemJsObject::Setup(jsEngine, value)); | 73 obj.SetProperty("_fileSystem", FileSystemJsObject::Setup(jsEngine, value)); |
| 75 value = jsEngine.NewObject(); | 74 value = jsEngine.NewObject(); |
| 76 obj.SetProperty("_webRequest", WebRequestJsObject::Setup(jsEngine, value)); | 75 obj.SetProperty("_webRequest", WebRequestJsObject::Setup(jsEngine, value)); |
| 77 value = jsEngine.NewObject(); | 76 value = jsEngine.NewObject(); |
| 78 obj.SetProperty("console", ConsoleJsObject::Setup(jsEngine, value)); | 77 obj.SetProperty("console", ConsoleJsObject::Setup(jsEngine, value)); |
| 79 value = jsEngine.NewObject(); | 78 value = jsEngine.NewObject(); |
| 80 obj.SetProperty("_appInfo", AppInfoJsObject::Setup(appInfo, value)); | 79 obj.SetProperty("_appInfo", AppInfoJsObject::Setup(appInfo, value)); |
| 81 return obj; | 80 return obj; |
| 82 } | 81 } |
| OLD | NEW |