| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 43c380e commit e8bddac
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -269,8 +269,7 @@ void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s) { | |||
| 269 | 269 | ||
| 270 | 270 | auto* modify_code_generation_from_strings_callback = | |
| 271 | 271 | ModifyCodeGenerationFromStrings; | |
| 272 | - if (s.flags & ALLOW_MODIFY_CODE_GENERATION_FROM_STRINGS_CALLBACK && | ||
| 273 | - s.modify_code_generation_from_strings_callback) { | ||
| 272 | + if (s.modify_code_generation_from_strings_callback != nullptr) { | ||
| 274 | 273 | modify_code_generation_from_strings_callback = | |
| 275 | 274 | s.modify_code_generation_from_strings_callback; | |
| 276 | 275 | } | |
@@ -382,18 +381,6 @@ Isolate* NewIsolate(std::shared_ptr<ArrayBufferAllocator> allocator, | |||
| 382 | 381 | settings); | |
| 383 | 382 | } | |
| 384 | 383 | ||
| 385 | - Isolate* NewIsolate(ArrayBufferAllocator* allocator, | ||
| 386 | - uv_loop_t* event_loop, | ||
| 387 | - MultiIsolatePlatform* platform) { | ||
| 388 | - return NewIsolate(allocator, event_loop, platform, nullptr); | ||
| 389 | - } | ||
| 390 | - | ||
| 391 | - Isolate* NewIsolate(std::shared_ptr<ArrayBufferAllocator> allocator, | ||
| 392 | - uv_loop_t* event_loop, | ||
| 393 | - MultiIsolatePlatform* platform) { | ||
| 394 | - return NewIsolate(allocator, event_loop, platform, nullptr); | ||
| 395 | - } | ||
| 396 | - | ||
| 397 | 384 | IsolateData* CreateIsolateData( | |
| 398 | 385 | Isolate* isolate, | |
| 399 | 386 | uv_loop_t* loop, | |
@@ -405,13 +392,6 @@ IsolateData* CreateIsolateData( | |||
| 405 | 392 | return new IsolateData(isolate, loop, platform, allocator, snapshot_data); | |
| 406 | 393 | } | |
| 407 | 394 | ||
| 408 | - IsolateData* CreateIsolateData(Isolate* isolate, | ||
| 409 | - uv_loop_t* loop, | ||
| 410 | - MultiIsolatePlatform* platform, | ||
| 411 | - ArrayBufferAllocator* allocator) { | ||
| 412 | - return CreateIsolateData(isolate, loop, platform, allocator, nullptr); | ||
| 413 | - } | ||
| 414 | - | ||
| 415 | 395 | void FreeIsolateData(IsolateData* isolate_data) { | |
| 416 | 396 | delete isolate_data; | |
| 417 | 397 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1270,10 +1270,6 @@ int Start(int argc, char** argv) { | |||
| 1270 | 1270 | return static_cast<int>(StartInternal(argc, argv)); | |
| 1271 | 1271 | } | |
| 1272 | 1272 | ||
| 1273 | - int Stop(Environment* env) { | ||
| 1274 | - return Stop(env, StopFlags::kNoFlags); | ||
| 1275 | - } | ||
| 1276 | - | ||
| 1277 | 1273 | int Stop(Environment* env, StopFlags::Flags flags) { | |
| 1278 | 1274 | env->ExitEnv(flags); | |
| 1279 | 1275 | return 0; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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 { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments