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

Side by Side Diff: src/AppInfoJsObject.cpp

Issue 10173031: Don`t use references to JsEngine to avoid use-after-free errors,switch to shared_ptr instead (Closed)
Patch Set: Created April 18, 2013, 4:15 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #include <AdblockPlus/AppInfo.h> 1 #include <AdblockPlus/AppInfo.h>
2 #include <AdblockPlus/JsValue.h> 2 #include <AdblockPlus/JsValue.h>
3 3
4 #include "AppInfoJsObject.h" 4 #include "AppInfoJsObject.h"
5 #include "Utils.h" 5 #include "Utils.h"
6 6
7 using namespace AdblockPlus; 7 using namespace AdblockPlus;
8 8
9 JsValuePtr AppInfoJsObject::Setup(JsEngine& jsEngine, const AppInfo& appInfo, 9 JsValuePtr AppInfoJsObject::Setup(JsEnginePtr jsEngine, const AppInfo& appInfo,
10 JsValuePtr obj) 10 JsValuePtr obj)
11 { 11 {
12 obj->SetProperty("id", appInfo.id); 12 obj->SetProperty("id", appInfo.id);
13 obj->SetProperty("version", appInfo.version); 13 obj->SetProperty("version", appInfo.version);
14 obj->SetProperty("name", appInfo.name); 14 obj->SetProperty("name", appInfo.name);
15 obj->SetProperty("platform", appInfo.platform); 15 obj->SetProperty("platform", appInfo.platform);
16 return obj; 16 return obj;
17 } 17 }
OLDNEW
« no previous file with comments | « src/AppInfoJsObject.h ('k') | src/ConsoleJsObject.h » ('j') | src/JsEngine.cpp » ('J')

Powered by Google App Engine
This is Rietveld