diff options
author | cjihrig <cjihrig@gmail.com> | 2018-10-07 10:07:25 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-10-10 10:32:05 -0400 |
commit | 20de5f3fa2c96897ae92ac27a1883b5d266d6ca1 (patch) | |
tree | 37c81411b59ed93df1747a53e93f2db319e4cc7e /src/node_http_parser.cc | |
parent | 59d2bd9fb5da1606ce673246aa5ca9fe17c7dd53 (diff) | |
download | node-new-20de5f3fa2c96897ae92ac27a1883b5d266d6ca1.tar.gz |
src: fix ToObject() usage in node_http_parser.cc
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'src/node_http_parser.cc')
-rw-r--r-- | src/node_http_parser.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 9850b4f698..b82710480d 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -623,7 +623,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))); |