Index: src/WebRequestJsObject.cpp |
=================================================================== |
--- a/src/WebRequestJsObject.cpp |
+++ b/src/WebRequestJsObject.cpp |
@@ -24,17 +24,17 @@ |
#include "Utils.h" |
#include "WebRequestJsObject.h" |
namespace |
{ |
class WebRequestThread : public AdblockPlus::Thread |
{ |
public: |
- WebRequestThread(AdblockPlus::JsEnginePtr jsEngine, AdblockPlus::JsValueList& arguments) |
+ WebRequestThread(const AdblockPlus::JsEnginePtr& jsEngine, const AdblockPlus::JsValueList& arguments) |
: Thread(true), jsEngine(jsEngine), url(arguments[0]->AsString()) |
{ |
if (!url.length()) |
throw std::runtime_error("Invalid string passed as first argument to GET"); |
{ |
AdblockPlus::JsValuePtr headersObj = arguments[1]; |
if (!headersObj->IsObject()) |
@@ -111,13 +111,13 @@ |
return v8::ThrowException(ToV8String(isolate, e.what())); |
} |
thread->Start(); |
return v8::Undefined(); |
} |
} |
AdblockPlus::JsValuePtr AdblockPlus::WebRequestJsObject::Setup( |
- AdblockPlus::JsEnginePtr jsEngine, AdblockPlus::JsValuePtr obj) |
+ AdblockPlus::JsEngine& jsEngine, const AdblockPlus::JsValuePtr& obj) |
{ |
- obj->SetProperty("GET", jsEngine->NewCallback(::GETCallback)); |
+ obj->SetProperty("GET", jsEngine.NewCallback(::GETCallback)); |
return obj; |
} |