Nan 2.0
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#include <node.h>
|
||||
#include <node_version.h>
|
||||
#include <nan.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -20,7 +18,7 @@ namespace util { template <typename T> class AsyncQueue; }
|
||||
|
||||
class NodeFileSource : public mbgl::FileSource {
|
||||
public:
|
||||
NodeFileSource(v8::Handle<v8::Object>);
|
||||
NodeFileSource(v8::Local<v8::Object>);
|
||||
~NodeFileSource();
|
||||
|
||||
mbgl::Request* request(const mbgl::Resource&, uv_loop_t*, Callback);
|
||||
@@ -36,14 +34,10 @@ private:
|
||||
void processAdd(const mbgl::Resource&);
|
||||
void processCancel(const mbgl::Resource&);
|
||||
|
||||
v8::Persistent<v8::Object> options;
|
||||
Nan::Persistent<v8::Object> options;
|
||||
|
||||
private:
|
||||
#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
|
||||
std::unordered_map<mbgl::Resource, v8::Persistent<v8::Object, v8::CopyablePersistentTraits<v8::Object>>, mbgl::Resource::Hash> pending;
|
||||
#else
|
||||
std::unordered_map<mbgl::Resource, v8::Persistent<v8::Object>, mbgl::Resource::Hash> pending;
|
||||
#endif
|
||||
std::unordered_map<mbgl::Resource, Nan::Persistent<v8::Object>, mbgl::Resource::Hash> pending;
|
||||
|
||||
// The observers list will hold pointers to all the requests waiting
|
||||
// for a particular resource. The access must be guarded by a mutex
|
||||
|
||||
Reference in New Issue
Block a user