| 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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } | 302 } |
| 303 | 303 |
| 304 void AdblockPlus::JsEngine::SetFileSystem(const AdblockPlus::FileSystemPtr& val) | 304 void AdblockPlus::JsEngine::SetFileSystem(const AdblockPlus::FileSystemPtr& val) |
| 305 { | 305 { |
| 306 if (!val) | 306 if (!val) |
| 307 throw std::runtime_error("FileSystem cannot be null"); | 307 throw std::runtime_error("FileSystem cannot be null"); |
| 308 | 308 |
| 309 fileSystem = val; | 309 fileSystem = val; |
| 310 } | 310 } |
| 311 | 311 |
| 312 AdblockPlus::WebRequestPtr AdblockPlus::JsEngine::GetWebRequest() const | 312 WebRequestSharedPtr AdblockPlus::JsEngine::GetWebRequest() const |
| 313 { | 313 { |
| 314 return webRequest; | 314 return webRequest; |
| 315 } | 315 } |
| 316 | 316 |
| 317 void AdblockPlus::JsEngine::SetWebRequest(const AdblockPlus::WebRequestPtr& val) | 317 void AdblockPlus::JsEngine::SetWebRequest(const AdblockPlus::WebRequestSharedPtr
& val) |
| 318 { | 318 { |
| 319 if (!val) | 319 if (!val) |
| 320 throw std::runtime_error("WebRequest cannot be null"); | 320 throw std::runtime_error("WebRequest cannot be null"); |
| 321 | 321 |
| 322 webRequest = val; | 322 webRequest = val; |
| 323 } | 323 } |
| 324 | 324 |
| 325 AdblockPlus::LogSystemPtr AdblockPlus::JsEngine::GetLogSystem() const | 325 AdblockPlus::LogSystemPtr AdblockPlus::JsEngine::GetLogSystem() const |
| 326 { | 326 { |
| 327 return logSystem; | 327 return logSystem; |
| 328 } | 328 } |
| 329 | 329 |
| 330 void AdblockPlus::JsEngine::SetLogSystem(const AdblockPlus::LogSystemPtr& val) | 330 void AdblockPlus::JsEngine::SetLogSystem(const AdblockPlus::LogSystemPtr& val) |
| 331 { | 331 { |
| 332 if (!val) | 332 if (!val) |
| 333 throw std::runtime_error("LogSystem cannot be null"); | 333 throw std::runtime_error("LogSystem cannot be null"); |
| 334 | 334 |
| 335 logSystem = val; | 335 logSystem = val; |
| 336 } | 336 } |
| 337 | 337 |
| 338 | 338 |
| 339 void AdblockPlus::JsEngine::SetGlobalProperty(const std::string& name, | 339 void AdblockPlus::JsEngine::SetGlobalProperty(const std::string& name, |
| 340 const AdblockPlus::JsValue& value) | 340 const AdblockPlus::JsValue& value) |
| 341 { | 341 { |
| 342 auto global = GetGlobalObject(); | 342 auto global = GetGlobalObject(); |
| 343 global.SetProperty(name, value); | 343 global.SetProperty(name, value); |
| 344 } | 344 } |
| OLD | NEW |