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

Unified Diff: include/AdblockPlus/JsValue.h

Issue 10727002: Get rid of dependencies on v8.h in public header files (Closed)
Patch Set: Created May 23, 2013, 2:43 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
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | libadblockplus.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | libadblockplus.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld