From cd69e1b6c3e07946b53548b72228c432e2993a79 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 7 Oct 2018 10:07:25 -0400 Subject: [PATCH] src: fix ToObject() usage in node_http_parser.cc PR-URL: https://github.com/nodejs/node/pull/23314 Reviewed-By: Anna Henningsen Reviewed-By: Daniel Bevenius Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani --- src/node_http_parser.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 0907f0a4329e88..771189d0904359 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -617,7 +617,8 @@ class Parser : public AsyncWrap, public StreamListener { enum http_errno err = HTTP_PARSER_ERRNO(&parser_); Local e = Exception::Error(env()->parse_error_string()); - Local obj = e->ToObject(env()->isolate()); + Local 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)));