Index: src/FilterEngine.cpp |
diff --git a/src/FilterEngine.cpp b/src/FilterEngine.cpp |
index 9b5662a052a0d81444bb40a93d80c0823d0242e6..20f07535a82641cda4bc6b50cf9215008dcc370a 100644 |
--- a/src/FilterEngine.cpp |
+++ b/src/FilterEngine.cpp |
@@ -54,7 +54,8 @@ Filter::Type Filter::GetType() |
bool Filter::IsListed() |
{ |
- JsValuePtr func = jsEngine->Evaluate("API.isListedFilter"); |
+ JsContext context(jsEngine); |
+ JsValuePtr func = context.GetJsEngine().Evaluate("API.isListedFilter"); |
JsValueList params; |
params.push_back(shared_from_this()); |
return func->Call(params)->AsBool(); |
@@ -62,7 +63,8 @@ bool Filter::IsListed() |
void Filter::AddToList() |
{ |
- JsValuePtr func = jsEngine->Evaluate("API.addFilterToList"); |
+ JsContext context(jsEngine); |
+ JsValuePtr func = context.GetJsEngine().Evaluate("API.addFilterToList"); |
JsValueList params; |
params.push_back(shared_from_this()); |
func->Call(params); |
@@ -70,7 +72,8 @@ void Filter::AddToList() |
void Filter::RemoveFromList() |
{ |
- JsValuePtr func = jsEngine->Evaluate("API.removeFilterFromList"); |
+ JsContext context(jsEngine); |
+ JsValuePtr func = context.GetJsEngine().Evaluate("API.removeFilterFromList"); |
JsValueList params; |
params.push_back(shared_from_this()); |
func->Call(params); |
@@ -90,7 +93,8 @@ Subscription::Subscription(JsValue&& value) |
bool Subscription::IsListed() |
{ |
- JsValuePtr func = jsEngine->Evaluate("API.isListedSubscription"); |
+ JsContext context(jsEngine); |
+ JsValuePtr func = context.GetJsEngine().Evaluate("API.isListedSubscription"); |
JsValueList params; |
params.push_back(shared_from_this()); |
return func->Call(params)->AsBool(); |
@@ -98,7 +102,8 @@ bool Subscription::IsListed() |
void Subscription::AddToList() |
{ |
- JsValuePtr func = jsEngine->Evaluate("API.addSubscriptionToList"); |
+ JsContext context(jsEngine); |
+ JsValuePtr func = context.GetJsEngine().Evaluate("API.addSubscriptionToList"); |
JsValueList params; |
params.push_back(shared_from_this()); |
func->Call(params); |
@@ -106,7 +111,8 @@ void Subscription::AddToList() |
void Subscription::RemoveFromList() |
{ |
- JsValuePtr func = jsEngine->Evaluate("API.removeSubscriptionFromList"); |
+ JsContext context(jsEngine); |
+ JsValuePtr func = context.GetJsEngine().Evaluate("API.removeSubscriptionFromList"); |
JsValueList params; |
params.push_back(shared_from_this()); |
func->Call(params); |
@@ -114,7 +120,8 @@ void Subscription::RemoveFromList() |
void Subscription::UpdateFilters() |
{ |
- JsValuePtr func = jsEngine->Evaluate("API.updateSubscription"); |
+ JsContext context(jsEngine); |
+ JsValuePtr func = context.GetJsEngine().Evaluate("API.updateSubscription"); |
JsValueList params; |
params.push_back(shared_from_this()); |
func->Call(params); |
@@ -122,7 +129,8 @@ void Subscription::UpdateFilters() |
bool Subscription::IsUpdating() |
{ |
- JsValuePtr func = jsEngine->Evaluate("API.isSubscriptionUpdating"); |
+ JsContext context(jsEngine); |
+ JsValuePtr func = context.GetJsEngine().Evaluate("API.isSubscriptionUpdating"); |
JsValueList params; |
params.push_back(shared_from_this()); |
JsValuePtr result = func->Call(params); |