[node] remove internal NodeRequest class from public API
This commit is contained in:
@@ -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>&);
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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>&);
|
||||
|
||||
Reference in New Issue
Block a user