Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/JsEngine.cpp

Issue 29497591: Issue 5180 - remove synchronous WebRequest interface and stop exposing of DefaultWebRequest (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 25, 2017, 2:31 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/DefaultWebRequestWinInet.cpp ('k') | src/WebRequestJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsEngine.cpp
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp
index cf83ead7a6d0cca73ad49049d153efb2e96d1294..79018c3f8df24a2f73cce82eb88f7e64cb7d8938 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -21,6 +21,7 @@
#include "JsError.h"
#include "Utils.h"
#include "DefaultTimer.h"
+#include "DefaultWebRequest.h"
#include <libplatform/libplatform.h>
namespace
@@ -85,7 +86,7 @@ FileSystemPtr AdblockPlus::CreateDefaultFileSystem()
WebRequestPtr AdblockPlus::CreateDefaultWebRequest()
{
- return WebRequestPtr(new DefaultWebRequest(std::make_shared<DefaultWebRequestSync>()));
+ return WebRequestPtr(new DefaultWebRequest(std::unique_ptr<DefaultWebRequestSync>(new DefaultWebRequestSync())));
}
AdblockPlus::ScopedV8Isolate::ScopedV8Isolate()
@@ -332,14 +333,6 @@ void AdblockPlus::JsEngine::SetFileSystem(const AdblockPlus::FileSystemSyncPtr&
fileSystem.reset(new DefaultFileSystem(val));
}
-void AdblockPlus::JsEngine::SetWebRequest(const AdblockPlus::WebRequestSharedPtr& val)
-{
- if (!val)
- throw std::runtime_error("WebRequest cannot be null");
-
- webRequestLegacy = val;
-}
-
AdblockPlus::LogSystemPtr AdblockPlus::JsEngine::GetLogSystem() const
{
return logSystem;
« no previous file with comments | « src/DefaultWebRequestWinInet.cpp ('k') | src/WebRequestJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld