Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/JsValue.cpp

Issue 29337850: Issue 3724 - Add JsValue::Call(const JsValue&) (Closed)
Patch Set: typo fix Created March 3, 2016, 11:20 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/AdblockPlus/Notification.h ('k') | src/Notification.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsValue.cpp
diff --git a/src/JsValue.cpp b/src/JsValue.cpp
index df4b72e33be2dc2819994fcc7e5aa1e525022298..8b1edc645d15605dfedf4e1093e058856f11fa58 100644
--- a/src/JsValue.cpp
+++ b/src/JsValue.cpp
@@ -229,3 +229,11 @@ AdblockPlus::JsValuePtr AdblockPlus::JsValue::Call(const JsValueList& params, Js
return JsValuePtr(new JsValue(jsEngine, result));
}
+
+AdblockPlus::JsValuePtr AdblockPlus::JsValue::Call(const JsValue& arg) const
+{
+ const JsContext context(jsEngine);
+ JsValueList params;
+ params.push_back(JsValuePtr(new JsValue(arg.jsEngine, arg.UnwrapValue())));
+ return Call(params);
+}
« no previous file with comments | « include/AdblockPlus/Notification.h ('k') | src/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld