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

Unified Diff: shell/src/GcCommand.h

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: shell/src/GcCommand.h
===================================================================
--- a/shell/src/GcCommand.h
+++ b/shell/src/GcCommand.h
@@ -4,18 +4,18 @@
#include <AdblockPlus.h>
#include <string>
#include "Command.h"
class GcCommand : public Command
{
public:
- explicit GcCommand(AdblockPlus::JsEngine& jsEngine);
+ explicit GcCommand(AdblockPlus::JsEnginePtr jsEngine);
void operator()(const std::string& arguments);
std::string GetDescription() const;
std::string GetUsage() const;
private:
- AdblockPlus::JsEngine& jsEngine;
+ AdblockPlus::JsEnginePtr jsEngine;
};
#endif
« no previous file with comments | « include/AdblockPlus/JsValue.h ('k') | shell/src/GcCommand.cpp » ('j') | src/JsEngine.cpp » ('J')

Powered by Google App Engine
This is Rietveld