Index: include/AdblockPlus/JsValue.h |
=================================================================== |
--- a/include/AdblockPlus/JsValue.h |
+++ b/include/AdblockPlus/JsValue.h |
@@ -16,19 +16,25 @@ |
*/ |
#ifndef ADBLOCK_PLUS_JS_VALUE_H |
#define ADBLOCK_PLUS_JS_VALUE_H |
#include <stdint.h> |
#include <string> |
#include <vector> |
-#include <v8.h> |
#include "tr1_memory.h" |
+namespace v8 |
+{ |
+ class Value; |
+ template <class T> class Handle; |
+ template <class T> class Persistent; |
+} |
+ |
namespace AdblockPlus |
{ |
class JsValue; |
class JsEngine; |
typedef std::tr1::shared_ptr<JsValue> JsValuePtr; |
typedef std::vector<AdblockPlus::JsValuePtr> JsValueList; |
@@ -71,13 +77,13 @@ namespace AdblockPlus |
std::string GetClass() const; |
JsValuePtr Call(const JsValueList& params = JsValueList(), |
AdblockPlus::JsValuePtr thisPtr = AdblockPlus::JsValuePtr()) const; |
protected: |
JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value); |
void SetProperty(const std::string& name, v8::Handle<v8::Value> val); |
JsEnginePtr jsEngine; |
- v8::Persistent<v8::Value> value; |
+ std::auto_ptr<v8::Persistent<v8::Value> > value; |
}; |
} |
#endif |