Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a194d83

Browse filesBrowse files
Tom Boutellgibfahn
authored andcommitted
src: use maybe versions of methods
PR-URL: #16005 Fixes: #15864 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 0460210 commit a194d83
Copy full SHA for a194d83

File tree

Expand file treeCollapse file tree

2 files changed

+6
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-5
lines changed
Open diff view settings
Collapse file

‎src/inspector_agent.cc‎

Copy file name to clipboardExpand all lines: src/inspector_agent.cc
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,11 @@ bool Agent::StartIoThread(bool wait_for_connect) {
496496

497497
v8::Isolate* isolate = parent_env_->isolate();
498498
HandleScope handle_scope(isolate);
499+
auto context = parent_env_->context();
499500

500501
// Enable tracking of async stack traces
501502
if (!enable_async_hook_function_.IsEmpty()) {
502503
Local<Function> enable_fn = enable_async_hook_function_.Get(isolate);
503-
auto context = parent_env_->context();
504504
auto result = enable_fn->Call(context, Undefined(isolate), 0, nullptr);
505505
if (result.IsEmpty()) {
506506
FatalError(
@@ -512,14 +512,15 @@ bool Agent::StartIoThread(bool wait_for_connect) {
512512
// Send message to enable debug in workers
513513
Local<Object> process_object = parent_env_->process_object();
514514
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();
516517
// In case the thread started early during the startup
517518
if (!emit_fn->IsFunction())
518519
return true;
519520

520521
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();
523524
Local<Value> argv[] = {
524525
FIXED_ONE_BYTE_STRING(isolate, "internalMessage"),
525526
message
Collapse file

‎src/inspector_js_api.cc‎

Copy file name to clipboardExpand all lines: src/inspector_js_api.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ void Open(const FunctionCallbackInfo<Value>& args) {
284284
}
285285

286286
if (args.Length() > 2 && args[2]->IsBoolean()) {
287-
wait_for_connect = args[2]->BooleanValue();
287+
wait_for_connect = args[2]->BooleanValue(env->context()).FromJust();
288288
}
289289

290290
agent->StartIoThread(wait_for_connect);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.