| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0460210 commit a194d83
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -496,11 +496,11 @@ bool Agent::StartIoThread(bool wait_for_connect) { | |||
| 496 | 496 | ||
| 497 | 497 | v8::Isolate* isolate = parent_env_->isolate(); | |
| 498 | 498 | HandleScope handle_scope(isolate); | |
| 499 | + auto context = parent_env_->context(); | ||
| 499 | 500 | ||
| 500 | 501 | // Enable tracking of async stack traces | |
| 501 | 502 | if (!enable_async_hook_function_.IsEmpty()) { | |
| 502 | 503 | Local<Function> enable_fn = enable_async_hook_function_.Get(isolate); | |
| 503 | - auto context = parent_env_->context(); | ||
| 504 | 504 | auto result = enable_fn->Call(context, Undefined(isolate), 0, nullptr); | |
| 505 | 505 | if (result.IsEmpty()) { | |
| 506 | 506 | FatalError( | |
@@ -512,14 +512,15 @@ bool Agent::StartIoThread(bool wait_for_connect) { | |||
| 512 | 512 | // Send message to enable debug in workers | |
| 513 | 513 | Local<Object> process_object = parent_env_->process_object(); | |
| 514 | 514 | Local<Value> emit_fn = | |
| 515 | - process_object->Get(FIXED_ONE_BYTE_STRING(isolate, "emit")); | ||
| 515 | + process_object->Get(context, FIXED_ONE_BYTE_STRING(isolate, "emit")) | ||
| 516 | + .ToLocalChecked(); | ||
| 516 | 517 | // In case the thread started early during the startup | |
| 517 | 518 | if (!emit_fn->IsFunction()) | |
| 518 | 519 | return true; | |
| 519 | 520 | ||
| 520 | 521 | Local<Object> message = Object::New(isolate); | |
| 521 | - message->Set(FIXED_ONE_BYTE_STRING(isolate, "cmd"), | ||
| 522 | - FIXED_ONE_BYTE_STRING(isolate, "NODE_DEBUG_ENABLED")); | ||
| 522 | + message->Set(context, FIXED_ONE_BYTE_STRING(isolate, "cmd"), | ||
| 523 | + FIXED_ONE_BYTE_STRING(isolate, "NODE_DEBUG_ENABLED")).FromJust(); | ||
| 523 | 524 | Local<Value> argv[] = { | |
| 524 | 525 | FIXED_ONE_BYTE_STRING(isolate, "internalMessage"), | |
| 525 | 526 | message | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -284,7 +284,7 @@ void Open(const FunctionCallbackInfo<Value>& args) { | |||
| 284 | 284 | } | |
| 285 | 285 | ||
| 286 | 286 | if (args.Length() > 2 && args[2]->IsBoolean()) { | |
| 287 | - wait_for_connect = args[2]->BooleanValue(); | ||
| 287 | + wait_for_connect = args[2]->BooleanValue(env->context()).FromJust(); | ||
| 288 | 288 | } | |
| 289 | 289 | ||
| 290 | 290 | agent->StartIoThread(wait_for_connect); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments