@@ -227,15 +227,14 @@ NODE_EXTERN int Start(int argc, char* argv[]);
227
227
// in the loop and / or actively executing JavaScript code).
228
228
NODE_EXTERN int Stop (Environment* env);
229
229
230
- // TODO(addaleax): Officially deprecate this and replace it with something
231
- // better suited for a public embedder API.
232
230
// It is recommended to use InitializeNodeWithArgs() instead as an embedder.
233
231
// Init() calls InitializeNodeWithArgs() and exits the process with the exit
234
232
// code returned from it.
235
- NODE_EXTERN void Init (int * argc,
236
- const char ** argv,
237
- int * exec_argc,
238
- const char *** exec_argv);
233
+ NODE_DEPRECATED (" Use InitializeNodeWithArgs() instead" ,
234
+ NODE_EXTERN void Init (int * argc,
235
+ const char ** argv,
236
+ int * exec_argc,
237
+ const char *** exec_argv));
239
238
// Set up per-process state needed to run Node.js. This will consume arguments
240
239
// from argv, fill exec_argv, and possibly add errors resulting from parsing
241
240
// the arguments to `errors`. The return value is a suggested exit code for the
@@ -428,12 +427,13 @@ struct InspectorParentHandle {
428
427
// Returns nullptr when the Environment cannot be created e.g. there are
429
428
// pending JavaScript exceptions.
430
429
// It is recommended to use the second variant taking a flags argument.
431
- NODE_EXTERN Environment* CreateEnvironment (IsolateData* isolate_data,
432
- v8::Local<v8::Context> context,
433
- int argc,
434
- const char * const * argv,
435
- int exec_argc,
436
- const char * const * exec_argv);
430
+ NODE_DEPRECATED (" Use overload taking a flags argument" ,
431
+ NODE_EXTERN Environment* CreateEnvironment (IsolateData* isolate_data,
432
+ v8::Local<v8::Context> context,
433
+ int argc,
434
+ const char * const * argv,
435
+ int exec_argc,
436
+ const char * const * exec_argv));
437
437
NODE_EXTERN Environment* CreateEnvironment (
438
438
IsolateData* isolate_data,
439
439
v8::Local<v8::Context> context,
@@ -463,8 +463,8 @@ struct StartExecutionCallbackInfo {
463
463
using StartExecutionCallback =
464
464
std::function<v8::MaybeLocal<v8::Value>(const StartExecutionCallbackInfo&)>;
465
465
466
- // TODO(addaleax): Deprecate this in favour of the MaybeLocal<> overload.
467
- NODE_EXTERN void LoadEnvironment (Environment* env);
466
+ NODE_DEPRECATED ( " Use variants returning MaybeLocal<> instead " ,
467
+ NODE_EXTERN void LoadEnvironment (Environment* env) );
468
468
// The `InspectorParentHandle` arguments here are ignored and not used.
469
469
// For passing `InspectorParentHandle`, use `CreateEnvironment()`.
470
470
NODE_EXTERN v8::MaybeLocal<v8::Value> LoadEnvironment (
@@ -495,18 +495,18 @@ NODE_EXTERN Environment* GetCurrentEnvironment(v8::Local<v8::Context> context);
495
495
// This returns the MultiIsolatePlatform used in the main thread of Node.js.
496
496
// If NODE_USE_V8_PLATFORM has not been defined when Node.js was built,
497
497
// it returns nullptr.
498
- // TODO(addaleax): Deprecate in favour of GetMultiIsolatePlatform().
499
- NODE_EXTERN MultiIsolatePlatform* GetMainThreadMultiIsolatePlatform ();
498
+ NODE_DEPRECATED ( " Use GetMultiIsolatePlatform(env) instead " ,
499
+ NODE_EXTERN MultiIsolatePlatform* GetMainThreadMultiIsolatePlatform () );
500
500
// This returns the MultiIsolatePlatform used for an Environment or IsolateData
501
501
// instance, if one exists.
502
502
NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform (Environment* env);
503
503
NODE_EXTERN MultiIsolatePlatform* GetMultiIsolatePlatform (IsolateData* env);
504
504
505
505
// Legacy variants of MultiIsolatePlatform::Create().
506
- // TODO(addaleax): Deprecate in favour of the v8::TracingController variant.
507
- NODE_EXTERN MultiIsolatePlatform* CreatePlatform (
508
- int thread_pool_size,
509
- node::tracing::TracingController* tracing_controller);
506
+ NODE_DEPRECATED ( " Use variant taking a v8::TracingController* pointer instead " ,
507
+ NODE_EXTERN MultiIsolatePlatform* CreatePlatform (
508
+ int thread_pool_size,
509
+ node::tracing::TracingController* tracing_controller) );
510
510
NODE_EXTERN MultiIsolatePlatform* CreatePlatform (
511
511
int thread_pool_size,
512
512
v8::TracingController* tracing_controller);
0 commit comments