Skip to content

Commit a144ca8

Browse files
committed
Revert "Removidos os erros de comipalção NaN, faltam 2 erros do sdk 7.0"
This reverts commit 6ecdca7.
1 parent 6ecdca7 commit a144ca8

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

src/njs/src/njsConnection.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,14 @@ void Connection::Init(Handle<Object> target)
114114
DESCRIPTION
115115
Invoked when new of connection is called from JS
116116
*/
117-
NAN_METHOD(Connection::New)
117+
v8::Handle<v8::Value> Connection::New(_NAN_METHOD_ARGS)
118118
{
119119
NanScope();
120120

121121
Connection *connection = new Connection();
122122
connection->Wrap(args.This());
123+
124+
return args.This();
123125
}
124126

125127
/*****************************************************************************/

src/njs/src/njsConnection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class Connection: public ObjectWrap
152152
static void Init (Handle<Object> target);
153153

154154
private:
155-
static NAN_METHOD(New);
155+
static v8::Handle<v8::Value> New(_NAN_METHOD_ARGS);
156156
// Execute Method on Connection class
157157
static NAN_METHOD(Execute);
158158
static void Async_Execute (uv_work_t *req);

src/njs/src/njsOracle.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void Oracledb::Init(Handle<Object> target)
8282
{
8383
NanScope();
8484

85-
Local<FunctionTemplate> temp = NanNew<v8::FunctionTemplate>(New);
85+
Local<FunctionTemplate> temp = FunctionTemplate::New(New);
8686
//Local<FunctionTemplate> temp = NanNew<FunctionTemplate>(New);
8787
temp->InstanceTemplate()->SetInternalFieldCount(1);
8888
temp->SetClassName(NanNew<v8::String>("Oracledb"));
@@ -142,12 +142,14 @@ void Oracledb::Init(Handle<Object> target)
142142
Invoked when new of oracledb is called from JS
143143
144144
*/
145-
NAN_METHOD(Oracledb::New)
145+
v8::Handle<v8::Value> Oracledb::New(_NAN_METHOD_ARGS)
146146
{
147147
NanScope();
148148

149149
Oracledb *oracledb = new Oracledb();
150150
oracledb->Wrap(args.This());
151+
152+
return args.This();
151153
}
152154

153155
/*****************************************************************************/

src/njs/src/njsOracle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Oracledb: public ObjectWrap
7171
// Define Oracledb Constructor
7272
static Persistent<FunctionTemplate> oracledbTemplate_s;
7373

74-
static NAN_METHOD(New);
74+
static v8::Handle<v8::Value> New(_NAN_METHOD_ARGS);
7575

7676
// Get Connection Methods
7777
static NAN_METHOD(GetConnection);

src/njs/src/njsPool.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void Pool::Init(Handle<Object> target)
7070
{
7171
NanScope();
7272

73-
Local<FunctionTemplate> temp = NanNew<v8::FunctionTemplate>(New);
73+
Local<FunctionTemplate> temp = FunctionTemplate::New(New);
7474
temp->InstanceTemplate()->SetInternalFieldCount(1);
7575
temp->SetClassName(NanNew<v8::String>("Pool"));
7676

@@ -116,12 +116,14 @@ void Pool::Init(Handle<Object> target)
116116
Invoked when new of pool is called from JS
117117
118118
*/
119-
NAN_METHOD(Pool::New)
119+
v8::Handle<v8::Value> Pool::New(_NAN_METHOD_ARGS)
120120
{
121121
NanScope();
122122

123123
Pool *njsPool = new Pool();
124124
njsPool->Wrap(args.This());
125+
126+
return args.This();
125127
}
126128

127129
/*****************************************************************************/

src/njs/src/njsPool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Pool: public ObjectWrap {
4949

5050
private:
5151

52-
static NAN_METHOD(New);
52+
static v8::Handle<v8::Value> New(_NAN_METHOD_ARGS);
5353

5454
// Get Connection Methods
5555
static NAN_METHOD(GetConnection);

0 commit comments

Comments
 (0)