Index: include/AdblockPlus/JsValue.h |
=================================================================== |
--- a/include/AdblockPlus/JsValue.h |
+++ b/include/AdblockPlus/JsValue.h |
@@ -35,21 +35,16 @@ |
namespace AdblockPlus |
{ |
class JsValue; |
class JsEngine; |
typedef std::shared_ptr<JsEngine> JsEnginePtr; |
/** |
- * Shared smart pointer to a `JsValue` instance. |
- */ |
- typedef std::shared_ptr<JsValue> JsValuePtr; |
- |
- /** |
* List of JavaScript values. |
*/ |
typedef std::vector<AdblockPlus::JsValue> JsValueList; |
/** |
* Wrapper for JavaScript values. |
* See `JsEngine` for creating `JsValue` objects. |
*/ |
@@ -117,21 +112,27 @@ |
* constructor. |
* @return Class name of the value. |
*/ |
std::string GetClass() const; |
/** |
* Invokes the value as a function (see `IsFunction()`). |
* @param params Optional list of parameters. |
- * @param thisPtr Optional `this` value. |
* @return Value returned by the function. |
*/ |
- JsValue Call(const JsValueList& params = JsValueList(), |
- const AdblockPlus::JsValuePtr& thisPtr = AdblockPlus::JsValuePtr()) const; |
+ JsValue Call(const JsValueList& params = JsValueList()) const; |
+ |
+ /** |
+ * Invokes the value as a method (see `IsFunction()`). |
+ * @param params list of parameters. |
+ * @param thisPtr `this` value. |
+ * @return Value returned by the function. |
+ */ |
+ JsValue Call(const JsValueList& params, const AdblockPlus::JsValue& thisValue) const; |
/** |
* Invokes the value as a function (see `IsFunction()`) with single |
* parameter. |
* @param arg A single required parameter. |
* @return Value returned by the function. |
*/ |
JsValue Call(const JsValue& arg) const; |