summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMike Morris <mikemorris@users.noreply.github.com>2016-10-12 17:29:44 -0400
committerMike Morris <mikemorris@users.noreply.github.com>2016-10-20 14:38:36 -0400
commita894870fb8f99632570ec1379fb55b287273fc58 (patch)
treef3660e594c6f0341344b075c2fa8ae4a7b2be013 /platform
parent817c26111a0d6650e7ebae73e46621626106d0a7 (diff)
downloadqtlocation-mapboxgl-a894870fb8f99632570ec1379fb55b287273fc58.tar.gz
[node] remove internal NodeRequest class from public API
Diffstat (limited to 'platform')
-rw-r--r--platform/node/src/node_map.hpp2
-rw-r--r--platform/node/src/node_mapbox_gl_native.cpp2
-rw-r--r--platform/node/src/node_request.cpp5
-rw-r--r--platform/node/src/node_request.hpp2
4 files changed, 4 insertions, 7 deletions
diff --git a/platform/node/src/node_map.hpp b/platform/node/src/node_map.hpp
index cdca1587ea..588ece2c74 100644
--- a/platform/node/src/node_map.hpp
+++ b/platform/node/src/node_map.hpp
@@ -25,7 +25,7 @@ public:
static Nan::Persistent<v8::Function> constructor;
- static void Init(v8::Local<v8::Object> exports);
+ static void Init(v8::Local<v8::Object>);
static void New(const Nan::FunctionCallbackInfo<v8::Value>&);
static void Load(const Nan::FunctionCallbackInfo<v8::Value>&);
diff --git a/platform/node/src/node_mapbox_gl_native.cpp b/platform/node/src/node_mapbox_gl_native.cpp
index 7c5a959553..042def9fdd 100644
--- a/platform/node/src/node_mapbox_gl_native.cpp
+++ b/platform/node/src/node_mapbox_gl_native.cpp
@@ -19,7 +19,7 @@ void RegisterModule(v8::Local<v8::Object> target, v8::Local<v8::Object> module)
nodeRunLoop.stop();
node_mbgl::NodeMap::Init(target);
- node_mbgl::NodeRequest::Init(target);
+ node_mbgl::NodeRequest::Init();
// Exports Resource constants.
v8::Local<v8::Object> resource = Nan::New<v8::Object>();
diff --git a/platform/node/src/node_request.cpp b/platform/node/src/node_request.cpp
index 607e6e8b03..de16710f78 100644
--- a/platform/node/src/node_request.cpp
+++ b/platform/node/src/node_request.cpp
@@ -26,7 +26,7 @@ NodeRequest::~NodeRequest() {
Nan::Persistent<v8::Function> NodeRequest::constructor;
-NAN_MODULE_INIT(NodeRequest::Init) {
+void NodeRequest::Init() {
v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
tpl->InstanceTemplate()->SetInternalFieldCount(1);
@@ -35,9 +35,6 @@ NAN_MODULE_INIT(NodeRequest::Init) {
Nan::SetPrototypeMethod(tpl, "respond", HandleCallback);
constructor.Reset(tpl->GetFunction());
-
- // TODO: Remove this from the public JavaScript API
- Nan::Set(target, Nan::New("Request").ToLocalChecked(), tpl->GetFunction());
}
void NodeRequest::New(const Nan::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/platform/node/src/node_request.hpp b/platform/node/src/node_request.hpp
index f7fce91726..7d7679a3c7 100644
--- a/platform/node/src/node_request.hpp
+++ b/platform/node/src/node_request.hpp
@@ -27,7 +27,7 @@ public:
static Nan::Persistent<v8::Function> constructor;
- static NAN_MODULE_INIT(Init);
+ static void Init();
static void New(const Nan::FunctionCallbackInfo<v8::Value>&);
static void HandleCallback(const Nan::FunctionCallbackInfo<v8::Value>&);