Skip to content

Commit 153c0dc

Browse files
cjihrigjasnell
authored andcommitted
src: fix ToObject() usage in node_http_parser.cc
PR-URL: #23314 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent 5d69627 commit 153c0dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node_http_parser.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,8 @@ class Parser : public AsyncWrap, public StreamListener {
623623
enum http_errno err = HTTP_PARSER_ERRNO(&parser_);
624624

625625
Local<Value> e = Exception::Error(env()->parse_error_string());
626-
Local<Object> obj = e->ToObject(env()->isolate());
626+
Local<Object> obj = e->ToObject(env()->isolate()->GetCurrentContext())
627+
.ToLocalChecked();
627628
obj->Set(env()->bytes_parsed_string(), nparsed_obj);
628629
obj->Set(env()->code_string(),
629630
OneByteString(env()->isolate(), http_errno_name(err)));

0 commit comments

Comments
 (0)