@@ -317,8 +317,8 @@ NODE_EXTERN int Start(int argc, char* argv[]);
317
317
318
318
// Tear down Node.js while it is running (there are active handles
319
319
// in the loop and / or actively executing JavaScript code).
320
- NODE_EXTERN int Stop (Environment* env);
321
- NODE_EXTERN int Stop (Environment* env, StopFlags::Flags flags);
320
+ NODE_EXTERN int Stop (Environment* env,
321
+ StopFlags::Flags flags = StopFlags:: kNoFlags );
322
322
323
323
// Set up per-process state needed to run Node.js. This will consume arguments
324
324
// from argv, fill exec_argv, and possibly add errors resulting from parsing
@@ -463,7 +463,7 @@ enum IsolateSettingsFlags {
463
463
DETAILED_SOURCE_POSITIONS_FOR_PROFILING = 1 << 1 ,
464
464
SHOULD_NOT_SET_PROMISE_REJECTION_CALLBACK = 1 << 2 ,
465
465
SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK = 1 << 3 ,
466
- ALLOW_MODIFY_CODE_GENERATION_FROM_STRINGS_CALLBACK = 1 << 4 ,
466
+ ALLOW_MODIFY_CODE_GENERATION_FROM_STRINGS_CALLBACK = 0 , /* legacy no-op */
467
467
};
468
468
469
469
struct IsolateSettings {
@@ -565,25 +565,17 @@ NODE_EXTERN void SetIsolateUpForNode(v8::Isolate* isolate);
565
565
// This is a convenience method equivalent to using SetIsolateCreateParams(),
566
566
// Isolate::Allocate(), MultiIsolatePlatform::RegisterIsolate(),
567
567
// Isolate::Initialize(), and SetIsolateUpForNode().
568
- NODE_EXTERN v8::Isolate* NewIsolate (ArrayBufferAllocator* allocator,
569
- struct uv_loop_s * event_loop,
570
- MultiIsolatePlatform* platform = nullptr );
571
- // TODO(addaleax): Merge with the function definition above.
572
- NODE_EXTERN v8::Isolate* NewIsolate (ArrayBufferAllocator* allocator,
573
- struct uv_loop_s * event_loop,
574
- MultiIsolatePlatform* platform,
575
- const EmbedderSnapshotData* snapshot_data,
576
- const IsolateSettings& settings = {});
577
568
NODE_EXTERN v8::Isolate* NewIsolate (
578
- std::shared_ptr< ArrayBufferAllocator> allocator,
569
+ ArrayBufferAllocator* allocator,
579
570
struct uv_loop_s * event_loop,
580
- MultiIsolatePlatform* platform);
581
- // TODO(addaleax): Merge with the function definition above.
571
+ MultiIsolatePlatform* platform,
572
+ const EmbedderSnapshotData* snapshot_data = nullptr ,
573
+ const IsolateSettings& settings = {});
582
574
NODE_EXTERN v8::Isolate* NewIsolate (
583
575
std::shared_ptr<ArrayBufferAllocator> allocator,
584
576
struct uv_loop_s * event_loop,
585
577
MultiIsolatePlatform* platform,
586
- const EmbedderSnapshotData* snapshot_data,
578
+ const EmbedderSnapshotData* snapshot_data = nullptr ,
587
579
const IsolateSettings& settings = {});
588
580
589
581
// Creates a new context with Node.js-specific tweaks.
@@ -603,14 +595,8 @@ NODE_EXTERN IsolateData* CreateIsolateData(
603
595
v8::Isolate* isolate,
604
596
struct uv_loop_s * loop,
605
597
MultiIsolatePlatform* platform = nullptr ,
606
- ArrayBufferAllocator* allocator = nullptr );
607
- // TODO(addaleax): Merge with the function definition above.
608
- NODE_EXTERN IsolateData* CreateIsolateData (
609
- v8::Isolate* isolate,
610
- struct uv_loop_s * loop,
611
- MultiIsolatePlatform* platform,
612
- ArrayBufferAllocator* allocator,
613
- const EmbedderSnapshotData* snapshot_data);
598
+ ArrayBufferAllocator* allocator = nullptr ,
599
+ const EmbedderSnapshotData* snapshot_data = nullptr );
614
600
NODE_EXTERN void FreeIsolateData (IsolateData* isolate_data);
615
601
616
602
struct ThreadId {
0 commit comments