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

Unified Diff: src/WebRequestJsObject.cpp

Issue 29543810: Issue 5118 - Lock the platform interfaces before use (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Added missing LogSystem Created Sept. 13, 2017, 5:46 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
« src/Platform.cpp ('K') | « src/Platform.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/WebRequestJsObject.cpp
===================================================================
--- a/src/WebRequestJsObject.cpp
+++ b/src/WebRequestJsObject.cpp
@@ -74,18 +74,21 @@
for (const auto& header : response.responseHeaders)
{
headersObject.SetProperty(header.first, header.second);
}
resultObject.SetProperty("responseHeaders", headersObject);
webRequestParams[2].Call(resultObject);
};
-
- jsEngine->GetPlatform().GetWebRequest().GET(url, headers, getCallback);
+ jsEngine->GetPlatform().WithWebRequest(
+ [url, headers, getCallback](IWebRequest& webRequest)
+ {
+ webRequest.GET(url, headers, getCallback);
+ });
}
namespace
{
void GETCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
try
{
« src/Platform.cpp ('K') | « src/Platform.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld