Skip to content

Commit 7a79bf2

Browse files
committed
Replaced usage of info.This() with info.Holder() for Node.js 0.10. Also fixed compile warning.
1 parent 150b975 commit 7a79bf2

File tree

5 files changed

+27
-27
lines changed

5 files changed

+27
-27
lines changed

src/njs/src/njsConnection.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ void Connection::Init(Handle<Object> target)
168168
NAN_METHOD(Connection::New)
169169
{
170170
Connection *connection = new Connection();
171-
connection->Wrap(info.This());
171+
connection->Wrap(info.Holder());
172172

173-
info.GetReturnValue().Set(info.This());
173+
info.GetReturnValue().Set(info.Holder());
174174
}
175175

176176
/*****************************************************************************/
@@ -442,7 +442,7 @@ NAN_METHOD(Connection::Execute)
442442
Connection *connection;
443443
NJS_GET_CALLBACK ( callback, info );
444444

445-
connection = Nan::ObjectWrap::Unwrap<Connection>(info.This());
445+
connection = Nan::ObjectWrap::Unwrap<Connection>(info.Holder());
446446

447447
/* If connection is invalid from JS, then throw an exception */
448448
NJS_CHECK_OBJECT_VALID2 ( connection, info ) ;
@@ -1298,7 +1298,7 @@ void Connection::GetInBindParamsArray(Local<Array> va8vals, Bind *bind,
12981298
//
12991299

13001300
bind->isArray = true;
1301-
bind->maxSize = arrayElementSize;
1301+
bind->maxSize = (ub4) arrayElementSize;
13021302

13031303
executeBaton->binds.push_back(bind);
13041304

@@ -3077,7 +3077,7 @@ NAN_METHOD(Connection::Release)
30773077
NJS_GET_CALLBACK ( callback, info );
30783078
ConnectionBusyStatus connStat;
30793079

3080-
connection = Nan::ObjectWrap::Unwrap<Connection>(info.This());
3080+
connection = Nan::ObjectWrap::Unwrap<Connection>(info.Holder());
30813081

30823082
/* If connection is invalide from JS, then throw an exception */
30833083
NJS_CHECK_OBJECT_VALID2 ( connection, info ) ;
@@ -3203,7 +3203,7 @@ NAN_METHOD(Connection::Commit)
32033203
Connection *connection;
32043204
NJS_GET_CALLBACK ( callback, info );
32053205

3206-
connection = Nan::ObjectWrap::Unwrap<Connection>(info.This());
3206+
connection = Nan::ObjectWrap::Unwrap<Connection>(info.Holder());
32073207

32083208
/* if connection is invalid from JS, then throw an exception */
32093209
NJS_CHECK_OBJECT_VALID2 ( connection, info ) ;
@@ -3310,7 +3310,7 @@ NAN_METHOD(Connection::Rollback)
33103310
Connection *connection;
33113311
NJS_GET_CALLBACK ( callback, info );
33123312

3313-
connection = Nan::ObjectWrap::Unwrap<Connection>(info.This());
3313+
connection = Nan::ObjectWrap::Unwrap<Connection>(info.Holder());
33143314
/* if connection is invalid from JS, then throw an exception */
33153315
NJS_CHECK_OBJECT_VALID2 ( connection, info );
33163316

@@ -3413,7 +3413,7 @@ NAN_METHOD(Connection::Break)
34133413
Connection *connection;
34143414
NJS_GET_CALLBACK ( callback, info );
34153415

3416-
connection = Nan::ObjectWrap::Unwrap<Connection>(info.This());
3416+
connection = Nan::ObjectWrap::Unwrap<Connection>(info.Holder());
34173417

34183418
/* If connection is invalid from JS, then throw an exception */
34193419
NJS_CHECK_OBJECT_VALID2 ( connection, info );

src/njs/src/njsIntLob.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,9 @@ NAN_METHOD(ILob::New)
330330

331331
ILob *iLob = new ILob();
332332

333-
iLob->Wrap(info.This());
333+
iLob->Wrap(info.Holder());
334334

335-
info.GetReturnValue().Set(info.This());
335+
info.GetReturnValue().Set(info.Holder());
336336
}
337337

338338

@@ -356,7 +356,7 @@ NAN_METHOD(ILob::New)
356356
NAN_METHOD(ILob::Release)
357357
{
358358

359-
ILob *iLob = Nan::ObjectWrap::Unwrap<ILob>(info.This());
359+
ILob *iLob = Nan::ObjectWrap::Unwrap<ILob>(info.Holder());
360360
string msg;
361361

362362
NJS_CHECK_OBJECT_VALID2(iLob, info);
@@ -834,7 +834,7 @@ NAN_METHOD(ILob::Read)
834834
ILob *iLob;
835835

836836
NJS_GET_CALLBACK(callback, info);
837-
iLob = Nan::ObjectWrap::Unwrap<ILob>(info.This());
837+
iLob = Nan::ObjectWrap::Unwrap<ILob>(info.Holder());
838838

839839
/* If iLob object is invalid from JS, then throw an exception */
840840
NJS_CHECK_OBJECT_VALID2 (iLob, info);
@@ -1033,7 +1033,7 @@ NAN_METHOD(ILob::Write)
10331033
ILob *iLob;
10341034

10351035
NJS_GET_CALLBACK(callback, info);
1036-
iLob = Nan::ObjectWrap::Unwrap<ILob>(info.This());
1036+
iLob = Nan::ObjectWrap::Unwrap<ILob>(info.Holder());
10371037

10381038
/* If iLob is invalid from JS, then throw an exception */
10391039
NJS_CHECK_OBJECT_VALID2 ( iLob, info );

src/njs/src/njsOracle.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ NAN_METHOD(Oracledb::New)
230230
100 * portVer +
231231
portUpdateVer ;
232232

233-
oracledb->Wrap(info.This());
234-
oracledb->jsOracledb.Reset( info.This() );
235-
info.GetReturnValue().Set(info.This());
233+
oracledb->Wrap(info.Holder());
234+
oracledb->jsOracledb.Reset( info.Holder() );
235+
info.GetReturnValue().Set(info.Holder());
236236
}
237237

238238
/*****************************************************************************/
@@ -684,7 +684,7 @@ NAN_METHOD(Oracledb::GetConnection)
684684
Local<Object> connProps;
685685
NJS_GET_CALLBACK ( callback, info );
686686

687-
Oracledb* oracledb = Nan::ObjectWrap::Unwrap<Oracledb> ( info.This() );
687+
Oracledb* oracledb = Nan::ObjectWrap::Unwrap<Oracledb> ( info.Holder() );
688688
connectionBaton *connBaton = new connectionBaton ( callback );
689689

690690
NJS_CHECK_OBJECT_VALID3 (oracledb, connBaton->error, exitGetConnection);
@@ -834,7 +834,7 @@ NAN_METHOD(Oracledb::CreatePool)
834834
Local<Object> poolProps;
835835
NJS_GET_CALLBACK ( callback, info );
836836

837-
Oracledb* oracledb = Nan::ObjectWrap::Unwrap<Oracledb> ( info.This() );
837+
Oracledb* oracledb = Nan::ObjectWrap::Unwrap<Oracledb> ( info.Holder() );
838838
connectionBaton *poolBaton = new connectionBaton ( callback );
839839

840840
NJS_CHECK_OBJECT_VALID3(oracledb, poolBaton->error, exitCreatePool);

src/njs/src/njsPool.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ void Pool::Init(Handle<Object> target)
146146
NAN_METHOD(Pool::New)
147147
{
148148
Pool *njsPool = new Pool();
149-
njsPool->Wrap(info.This());
149+
njsPool->Wrap(info.Holder());
150150

151-
info.GetReturnValue().Set(info.This());
151+
info.GetReturnValue().Set(info.Holder());
152152
}
153153

154154
/*****************************************************************************/
@@ -393,7 +393,7 @@ NAN_METHOD(Pool::GetConnection)
393393
Local<Function> callback;
394394
NJS_GET_CALLBACK ( callback, info );
395395

396-
Pool *njsPool = Nan::ObjectWrap::Unwrap<Pool>(info.This());
396+
Pool *njsPool = Nan::ObjectWrap::Unwrap<Pool>(info.Holder());
397397

398398
poolBaton *connBaton = new poolBaton ( callback );
399399

@@ -519,7 +519,7 @@ NAN_METHOD(Pool::Terminate)
519519
Local<Function> callback;
520520
NJS_GET_CALLBACK ( callback, info );
521521

522-
Pool *njsPool = Nan::ObjectWrap::Unwrap<Pool>(info.This());
522+
Pool *njsPool = Nan::ObjectWrap::Unwrap<Pool>(info.Holder());
523523

524524
poolBaton *terminateBaton = new poolBaton ( callback );
525525

src/njs/src/njsResultSet.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ NAN_METHOD(ResultSet::New)
170170
{
171171

172172
ResultSet *resultSet = new ResultSet();
173-
resultSet->Wrap(info.This());
173+
resultSet->Wrap(info.Holder());
174174

175-
info.GetReturnValue().Set(info.This());
175+
info.GetReturnValue().Set(info.Holder());
176176
}
177177

178178
/*****************************************************************************/
@@ -243,7 +243,7 @@ NAN_METHOD(ResultSet::GetRow)
243243
Local<Function> callback;
244244
NJS_GET_CALLBACK ( callback, info );
245245

246-
ResultSet *njsResultSet = Nan::ObjectWrap::Unwrap<ResultSet>(info.This());
246+
ResultSet *njsResultSet = Nan::ObjectWrap::Unwrap<ResultSet>(info.Holder());
247247

248248
/* If njsResultSet is invalid from JS, then throw an exception */
249249
NJS_CHECK_OBJECT_VALID2 ( njsResultSet, info );
@@ -291,7 +291,7 @@ NAN_METHOD(ResultSet::GetRows)
291291
Local<Function> callback;
292292
NJS_GET_CALLBACK ( callback, info );
293293

294-
ResultSet *njsResultSet = Nan::ObjectWrap::Unwrap<ResultSet>(info.This());
294+
ResultSet *njsResultSet = Nan::ObjectWrap::Unwrap<ResultSet>(info.Holder());
295295

296296
/* If njsResultSet is invalid from JS, then throw an exception */
297297
NJS_CHECK_OBJECT_VALID2 ( njsResultSet, info );
@@ -557,7 +557,7 @@ NAN_METHOD(ResultSet::Close)
557557
Local<Function> callback;
558558
NJS_GET_CALLBACK ( callback, info );
559559

560-
ResultSet *njsResultSet = Nan::ObjectWrap::Unwrap<ResultSet>(info.This());
560+
ResultSet *njsResultSet = Nan::ObjectWrap::Unwrap<ResultSet>(info.Holder());
561561

562562
/* If njsResultSet is invalid from JS, then throw an exception */
563563
NJS_CHECK_OBJECT_VALID2 ( njsResultSet, info );

0 commit comments

Comments
 (0)