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

Unified 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.
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/AppInfoJsObject.cpp
===================================================================
--- a/src/AppInfoJsObject.cpp
+++ b/src/AppInfoJsObject.cpp
@@ -1,17 +1,17 @@
#include <AdblockPlus/AppInfo.h>
#include <AdblockPlus/JsValue.h>
#include "AppInfoJsObject.h"
#include "Utils.h"
using namespace AdblockPlus;
-JsValuePtr AppInfoJsObject::Setup(JsEngine& jsEngine, const AppInfo& appInfo,
+JsValuePtr AppInfoJsObject::Setup(JsEnginePtr jsEngine, const AppInfo& appInfo,
JsValuePtr obj)
{
obj->SetProperty("id", appInfo.id);
obj->SetProperty("version", appInfo.version);
obj->SetProperty("name", appInfo.name);
obj->SetProperty("platform", appInfo.platform);
return obj;
}
« 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