Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/node_http_parser.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc
index 9850b4f6982..b82710480de 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)));