diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 2236b47359..083f496dea 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -68,9 +68,6 @@ static Persistent should_keep_alive_sym; #define DEFINE_HTTP_CB(name) \ static int name(http_parser *p) { \ Parser *parser = static_cast(p->data); \ - \ - HandleScope scope; \ - \ Local cb_value = parser->handle_->Get(name##_sym); \ if (!cb_value->IsFunction()) return 0; \ Local cb = Local::Cast(cb_value); \ @@ -82,7 +79,6 @@ static Persistent should_keep_alive_sym; #define DEFINE_HTTP_DATA_CB(name) \ static int name(http_parser *p, const char *at, size_t length) { \ Parser *parser = static_cast(p->data); \ - HandleScope scope; \ assert(parser->buffer_); \ Local cb_value = parser->handle_->Get(name##_sym); \ if (!cb_value->IsFunction()) return 0; \ @@ -145,8 +141,6 @@ class Parser : public ObjectWrap { static int on_headers_complete(http_parser *p) { Parser *parser = static_cast(p->data); - HandleScope scope; - Local cb_value = parser->handle_->Get(on_headers_complete_sym); if (!cb_value->IsFunction()) return 0; Local cb = Local::Cast(cb_value); @@ -267,9 +261,7 @@ class Parser : public ObjectWrap { assert(!parser->buffer_); - parser->Ref(); http_parser_execute(&(parser->parser_), NULL, 0); - parser->Unref(); return Undefined(); }