Skip to content

Commit a2f61c4

Browse files
committed
[squash] add deprecation warnings for deprecated MakeCallbacks
1 parent 85597ca commit a2f61c4

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

src/node.h

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -613,29 +613,32 @@ v8::MaybeLocal<v8::Value> MakeCallback(v8::Isolate* isolate,
613613
// Legacy, Node 8.x only.
614614

615615
NODE_EXTERN
616-
v8::MaybeLocal<v8::Value> MakeCallback(v8::Isolate* isolate,
617-
v8::Local<v8::Object> recv,
618-
v8::Local<v8::Function> callback,
619-
int argc,
620-
v8::Local<v8::Value>* argv,
621-
async_id asyncId,
622-
async_id triggerAsyncId);
616+
NODE_DEPRECATED("Use MakeCallback(..., async_context asyncContext) instead",
617+
v8::MaybeLocal<v8::Value> MakeCallback(v8::Isolate* isolate,
618+
v8::Local<v8::Object> recv,
619+
v8::Local<v8::Function> callback,
620+
int argc,
621+
v8::Local<v8::Value>* argv,
622+
async_id asyncId,
623+
async_id triggerAsyncId));
623624
NODE_EXTERN
624-
v8::MaybeLocal<v8::Value> MakeCallback(v8::Isolate* isolate,
625-
v8::Local<v8::Object> recv,
626-
const char* method,
627-
int argc,
628-
v8::Local<v8::Value>* argv,
629-
async_id asyncId,
630-
async_id triggerAsyncId);
625+
NODE_DEPRECATED("Use MakeCallback(..., async_context asyncContext) instead",
626+
v8::MaybeLocal<v8::Value> MakeCallback(v8::Isolate* isolate,
627+
v8::Local<v8::Object> recv,
628+
const char* method,
629+
int argc,
630+
v8::Local<v8::Value>* argv,
631+
async_id asyncId,
632+
async_id triggerAsyncId));
631633
NODE_EXTERN
632-
v8::MaybeLocal<v8::Value> MakeCallback(v8::Isolate* isolate,
633-
v8::Local<v8::Object> recv,
634-
v8::Local<v8::String> symbol,
635-
int argc,
636-
v8::Local<v8::Value>* argv,
637-
async_id asyncId,
638-
async_id triggerAsyncId);
634+
NODE_DEPRECATED("Use MakeCallback(..., async_context asyncContext) instead",
635+
v8::MaybeLocal<v8::Value> MakeCallback(v8::Isolate* isolate,
636+
v8::Local<v8::Object> recv,
637+
v8::Local<v8::String> symbol,
638+
int argc,
639+
v8::Local<v8::Value>* argv,
640+
async_id asyncId,
641+
async_id triggerAsyncId));
639642

640643
/* Helper class users can optionally inherit from. If
641644
* `AsyncResource::MakeCallback()` is used, then all four callbacks will be

0 commit comments

Comments
 (0)