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

Unified Diff: src/AppInfoJsObject.cpp

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 | « src/AppInfoJsObject.h ('k') | src/ConsoleJsObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/AppInfoJsObject.cpp
===================================================================
--- a/src/AppInfoJsObject.cpp
+++ b/src/AppInfoJsObject.cpp
@@ -18,18 +18,18 @@
#include <AdblockPlus/AppInfo.h>
#include <AdblockPlus/JsValue.h>
#include "AppInfoJsObject.h"
#include "Utils.h"
using namespace AdblockPlus;
-JsValuePtr AppInfoJsObject::Setup(const AppInfo& appInfo, const JsValuePtr& obj)
+JsValue& AppInfoJsObject::Setup(const AppInfo& appInfo, JsValue& obj)
{
- obj->SetProperty("version", appInfo.version);
- obj->SetProperty("name", appInfo.name);
- obj->SetProperty("application", appInfo.application);
- obj->SetProperty("applicationVersion", appInfo.applicationVersion);
- obj->SetProperty("locale", appInfo.locale);
- obj->SetProperty("developmentBuild", appInfo.developmentBuild);
+ obj.SetProperty("version", appInfo.version);
+ obj.SetProperty("name", appInfo.name);
+ obj.SetProperty("application", appInfo.application);
+ obj.SetProperty("applicationVersion", appInfo.applicationVersion);
+ obj.SetProperty("locale", appInfo.locale);
+ obj.SetProperty("developmentBuild", appInfo.developmentBuild);
return obj;
}
« no previous file with comments | « src/AppInfoJsObject.h ('k') | src/ConsoleJsObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld