@@ -1479,17 +1479,19 @@ class Callback {
1479
1479
return !operator ==(other);
1480
1480
}
1481
1481
1482
+ // TODO(ofrobots): This is dangerous as it allows a call without async
1483
+ // context. In a semver-major consider disallowing this.
1482
1484
inline
1483
1485
v8::Local<v8::Function> operator *() const { return GetFunction (); }
1484
1486
1485
- inline v8::Local<v8::Value> operator ()(
1487
+ NAN_DEPRECATED inline v8::Local<v8::Value> operator ()(
1486
1488
v8::Local<v8::Object> target
1487
1489
, int argc = 0
1488
1490
, v8::Local<v8::Value> argv[] = 0 ) const {
1489
1491
return this ->Call (target, argc, argv);
1490
1492
}
1491
1493
1492
- inline v8::Local<v8::Value> operator ()(
1494
+ NAN_DEPRECATED inline v8::Local<v8::Value> operator ()(
1493
1495
int argc = 0
1494
1496
, v8::Local<v8::Value> argv[] = 0 ) const {
1495
1497
return this ->Call (argc, argv);
@@ -1523,6 +1525,8 @@ class Callback {
1523
1525
handle_.Reset ();
1524
1526
}
1525
1527
1528
+ // TODO(ofrobots): This is dangerous as it allows a call without async
1529
+ // context. In a semver-major consider disallowing this.
1526
1530
inline v8::Local<v8::Function> GetFunction () const {
1527
1531
return New (handle_);
1528
1532
}
@@ -1531,7 +1535,7 @@ class Callback {
1531
1535
return handle_.IsEmpty ();
1532
1536
}
1533
1537
1534
- inline v8::Local<v8::Value>
1538
+ NAN_DEPRECATED inline v8::Local<v8::Value>
1535
1539
Call (v8::Local<v8::Object> target
1536
1540
, int argc
1537
1541
, v8::Local<v8::Value> argv[]) const {
@@ -1543,7 +1547,7 @@ class Callback {
1543
1547
#endif
1544
1548
}
1545
1549
1546
- inline v8::Local<v8::Value>
1550
+ NAN_DEPRECATED inline v8::Local<v8::Value>
1547
1551
Call (int argc, v8::Local<v8::Value> argv[]) const {
1548
1552
#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
1549
1553
v8::Isolate *isolate = v8::Isolate::GetCurrent ();
0 commit comments