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

Unified Diff: include/AdblockPlus/JsValue.h

Issue 29416579: Issue 5034 - Part 1: Pass a JsValue directly to SetProperty() and return from GetProperty() (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Remove JsValue test Created April 19, 2017, 2:46 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
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | shell/src/FiltersCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/JsValue.h
===================================================================
--- a/include/AdblockPlus/JsValue.h
+++ b/include/AdblockPlus/JsValue.h
@@ -82,28 +82,28 @@
std::vector<std::string> GetOwnPropertyNames() const;
/**
* Returns a property value if this is an object (see `IsObject()`).
* @param name Property name.
* @return Property value, undefined (see `IsUndefined()`) if the property
* does not exist.
*/
- JsValuePtr GetProperty(const std::string& name) const;
+ JsValue GetProperty(const std::string& name) const;
//@{
/**
* Sets a property value if this is an object (see `IsObject()`).
* @param name Property name.
* @param val Property value.
*/
void SetProperty(const std::string& name, const std::string& val);
void SetProperty(const std::string& name, int64_t val);
void SetProperty(const std::string& name, bool val);
- void SetProperty(const std::string& name, const JsValuePtr& value);
+ void SetProperty(const std::string& name, const JsValue& value);
inline void SetProperty(const std::string& name, const char* val)
{
SetProperty(name, std::string(val));
}
inline void SetProperty(const std::string& name, int val)
{
SetProperty(name, static_cast<int64_t>(val));
}
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | shell/src/FiltersCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld