Index: src/JsEngine.cpp |
=================================================================== |
--- a/src/JsEngine.cpp |
+++ b/src/JsEngine.cpp |
@@ -151,27 +151,27 @@ |
} |
AdblockPlus::JsValue AdblockPlus::JsEngine::GetGlobalObject() |
{ |
JsContext context(shared_from_this()); |
return JsValue(shared_from_this(), context.GetV8Context()->Global()); |
} |
-AdblockPlus::JsValuePtr AdblockPlus::JsEngine::Evaluate(const std::string& source, |
+AdblockPlus::JsValue AdblockPlus::JsEngine::Evaluate(const std::string& source, |
const std::string& filename) |
{ |
const JsContext context(shared_from_this()); |
const v8::TryCatch tryCatch; |
const v8::Handle<v8::Script> script = CompileScript(GetIsolate(), source, |
filename); |
CheckTryCatch(tryCatch); |
v8::Local<v8::Value> result = script->Run(); |
CheckTryCatch(tryCatch); |
- return JsValuePtr(new JsValue(shared_from_this(), result)); |
+ return JsValue(shared_from_this(), result); |
} |
void AdblockPlus::JsEngine::SetEventCallback(const std::string& eventName, |
const AdblockPlus::JsEngine::EventCallback& callback) |
{ |
if (!callback) |
{ |
RemoveEventCallback(eventName); |