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

Unified Diff: src/WebRequestJsObject.cpp

Issue 29424786: Issue 5182 - fix IsConnectionAllowed (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created April 28, 2017, 2:42 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/JsEngine.cpp ('k') | test/FilterEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/WebRequestJsObject.cpp
diff --git a/src/WebRequestJsObject.cpp b/src/WebRequestJsObject.cpp
index 4b716d1b789af761ee3f36b7518c72117bfbad12..70375b2fddae53198f0965c8fc62d0a71b975dd6 100644
--- a/src/WebRequestJsObject.cpp
+++ b/src/WebRequestJsObject.cpp
@@ -54,18 +54,9 @@ namespace
throw std::runtime_error("Third argument to GET must be a function");
}
- AdblockPlus::ServerResponse NotAllowedResponse()
- {
- AdblockPlus::ServerResponse result;
- result.status = AdblockPlus::WebRequest::NS_ERROR_CONNECTION_REFUSED;
- result.responseStatus = 0;
- return result;
- }
-
void Run()
{
- AdblockPlus::ServerResponse result = jsEngine->IsConnectionAllowed() ?
- jsEngine->GetWebRequest()->GET(url, headers) : NotAllowedResponse();
+ AdblockPlus::ServerResponse result = jsEngine->GetWebRequest()->GET(url, headers);
AdblockPlus::JsContext context(*jsEngine);
« no previous file with comments | « src/JsEngine.cpp ('k') | test/FilterEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld