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

Unified Diff: src/JsValue.cpp

Issue 29410664: Issue 5013 - Use const JsValue and pass reference where applicable (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Remove the SetProperty() changes. Created April 13, 2017, 1:16 p.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
Index: src/JsValue.cpp
===================================================================
--- a/src/JsValue.cpp
+++ b/src/JsValue.cpp
@@ -168,16 +168,21 @@
obj->Set(property, val);
}
v8::Local<v8::Value> AdblockPlus::JsValue::UnwrapValue() const
{
return v8::Local<v8::Value>::New(jsEngine->GetIsolate(), *value);
}
+JsValue AdblockPlus::JsValue::Clone() const
+{
+ return JsValue(jsEngine, UnwrapValue());
+}
+
void AdblockPlus::JsValue::SetProperty(const std::string& name, const std::string& val)
{
const JsContext context(jsEngine);
SetProperty(name, Utils::ToV8String(jsEngine->GetIsolate(), val));
}
void AdblockPlus::JsValue::SetProperty(const std::string& name, int64_t val)
{

Powered by Google App Engine
This is Rietveld