add node v0.12 and io.js compatibility
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include "node_request.hpp"
|
||||
#include "compress_png.hpp"
|
||||
|
||||
|
||||
void RegisterModule(v8::Handle<v8::Object> exports) {
|
||||
NanScope();
|
||||
|
||||
@@ -22,7 +21,7 @@ void RegisterModule(v8::Handle<v8::Object> exports) {
|
||||
|
||||
// Exports Resource constants.
|
||||
auto ConstantProperty = static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete);
|
||||
auto resource = v8::Object::New();
|
||||
auto resource = NanNew<v8::Object>();
|
||||
resource->ForceSet(NanNew("Unknown"), NanNew(mbgl::Resource::Unknown), ConstantProperty);
|
||||
resource->ForceSet(NanNew("Tile"), NanNew(mbgl::Resource::Tile), ConstantProperty);
|
||||
resource->ForceSet(NanNew("Glyphs"), NanNew(mbgl::Resource::Glyphs), ConstantProperty);
|
||||
|
||||
Reference in New Issue
Block a user