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

Side by Side 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.
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 #ifndef GC_COMMAND_H 1 #ifndef GC_COMMAND_H
2 #define GC_COMMAND_H 2 #define GC_COMMAND_H
3 3
4 #include <AdblockPlus.h> 4 #include <AdblockPlus.h>
5 #include <string> 5 #include <string>
6 6
7 #include "Command.h" 7 #include "Command.h"
8 8
9 class GcCommand : public Command 9 class GcCommand : public Command
10 { 10 {
11 public: 11 public:
12 explicit GcCommand(AdblockPlus::JsEngine& jsEngine); 12 explicit GcCommand(AdblockPlus::JsEnginePtr jsEngine);
13 void operator()(const std::string& arguments); 13 void operator()(const std::string& arguments);
14 std::string GetDescription() const; 14 std::string GetDescription() const;
15 std::string GetUsage() const; 15 std::string GetUsage() const;
16 16
17 private: 17 private:
18 AdblockPlus::JsEngine& jsEngine; 18 AdblockPlus::JsEnginePtr jsEngine;
19 }; 19 };
20 20
21 #endif 21 #endif
OLDNEW
« 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