Skip to content

Commit

Permalink
src: fix ToObject() usage in node_http_parser.cc
Browse files Browse the repository at this point in the history
PR-URL: #23314
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
cjihrig authored and targos committed Oct 10, 2018
1 parent 5228ec4 commit cd69e1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node_http_parser.cc
Expand Up @@ -617,7 +617,8 @@ class Parser : public AsyncWrap, public StreamListener {
enum http_errno err = HTTP_PARSER_ERRNO(&parser_);

Local<Value> e = Exception::Error(env()->parse_error_string());
Local<Object> obj = e->ToObject(env()->isolate());
Local<Object> obj = e->ToObject(env()->isolate()->GetCurrentContext())
.ToLocalChecked();
obj->Set(env()->bytes_parsed_string(), nparsed_obj);
obj->Set(env()->code_string(),
OneByteString(env()->isolate(), http_errno_name(err)));
Expand Down

0 comments on commit cd69e1b

Please sign in to comment.