Index: src/WebRequestJsObject.cpp |
=================================================================== |
--- a/src/WebRequestJsObject.cpp |
+++ b/src/WebRequestJsObject.cpp |
@@ -13,18 +13,20 @@ |
* |
* You should have received a copy of the GNU General Public License |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
#include <map> |
#include <AdblockPlus/JsValue.h> |
#include <AdblockPlus/WebRequest.h> |
+ |
+#include "JsContext.h" |
+#include "Thread.h" |
#include "WebRequestJsObject.h" |
-#include "Thread.h" |
namespace |
{ |
class WebRequestThread : public AdblockPlus::Thread |
{ |
public: |
WebRequestThread(AdblockPlus::JsEnginePtr jsEngine, AdblockPlus::JsValueList& arguments) |
: jsEngine(jsEngine), url(arguments[0]->AsString()) |
@@ -52,17 +54,17 @@ namespace |
if (!callback->IsFunction()) |
throw std::runtime_error("Third argument to GET must be a function"); |
} |
void Run() |
{ |
AdblockPlus::ServerResponse result = jsEngine->GetWebRequest()->GET(url, headers); |
- AdblockPlus::JsEngine::Context context(jsEngine); |
+ AdblockPlus::JsContext context(jsEngine); |
AdblockPlus::JsValuePtr resultObject = jsEngine->NewObject(); |
resultObject->SetProperty("status", result.status); |
resultObject->SetProperty("responseStatus", result.responseStatus); |
resultObject->SetProperty("responseText", result.responseText); |
AdblockPlus::JsValuePtr headersObject = jsEngine->NewObject(); |
for (AdblockPlus::HeaderList::iterator it = result.responseHeaders.begin(); |