| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a793706 commit 5298da0
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -563,15 +563,15 @@ class Parser : public AsyncWrap, public StreamListener { | |||
| 563 | 563 | new Parser(binding_data, args.This()); | |
| 564 | 564 | } | |
| 565 | 565 | ||
| 566 | - | ||
| 566 | + // TODO(@anonrig): Add V8 Fast API | ||
| 567 | 567 | static void Close(const FunctionCallbackInfo<Value>& args) { | |
| 568 | 568 | Parser* parser; | |
| 569 | 569 | ASSIGN_OR_RETURN_UNWRAP(&parser, args.This()); | |
| 570 | 570 | ||
| 571 | 571 | delete parser; | |
| 572 | 572 | } | |
| 573 | 573 | ||
| 574 | - | ||
| 574 | + // TODO(@anonrig): Add V8 Fast API | ||
| 575 | 575 | static void Free(const FunctionCallbackInfo<Value>& args) { | |
| 576 | 576 | Parser* parser; | |
| 577 | 577 | ASSIGN_OR_RETURN_UNWRAP(&parser, args.This()); | |
@@ -582,6 +582,7 @@ class Parser : public AsyncWrap, public StreamListener { | |||
| 582 | 582 | parser->EmitDestroy(); | |
| 583 | 583 | } | |
| 584 | 584 | ||
| 585 | + // TODO(@anonrig): Add V8 Fast API | ||
| 585 | 586 | static void Remove(const FunctionCallbackInfo<Value>& args) { | |
| 586 | 587 | Parser* parser; | |
| 587 | 588 | ASSIGN_OR_RETURN_UNWRAP(&parser, args.This()); | |
@@ -694,6 +695,7 @@ class Parser : public AsyncWrap, public StreamListener { | |||
| 694 | 695 | } | |
| 695 | 696 | } | |
| 696 | 697 | ||
| 698 | + // TODO(@anonrig): Add V8 Fast API | ||
| 697 | 699 | template <bool should_pause> | |
| 698 | 700 | static void Pause(const FunctionCallbackInfo<Value>& args) { | |
| 699 | 701 | Environment* env = Environment::GetCurrent(args); | |
@@ -709,7 +711,7 @@ class Parser : public AsyncWrap, public StreamListener { | |||
| 709 | 711 | } | |
| 710 | 712 | } | |
| 711 | 713 | ||
| 712 | - | ||
| 714 | + // TODO(@anonrig): Add V8 Fast API | ||
| 713 | 715 | static void Consume(const FunctionCallbackInfo<Value>& args) { | |
| 714 | 716 | Parser* parser; | |
| 715 | 717 | ASSIGN_OR_RETURN_UNWRAP(&parser, args.This()); | |
@@ -719,7 +721,7 @@ class Parser : public AsyncWrap, public StreamListener { | |||
| 719 | 721 | stream->PushStreamListener(parser); | |
| 720 | 722 | } | |
| 721 | 723 | ||
| 722 | - | ||
| 724 | + // TODO(@anonrig): Add V8 Fast API | ||
| 723 | 725 | static void Unconsume(const FunctionCallbackInfo<Value>& args) { | |
| 724 | 726 | Parser* parser; | |
| 725 | 727 | ASSIGN_OR_RETURN_UNWRAP(&parser, args.This()); | |
@@ -744,26 +746,6 @@ class Parser : public AsyncWrap, public StreamListener { | |||
| 744 | 746 | args.GetReturnValue().Set(ret); | |
| 745 | 747 | } | |
| 746 | 748 | ||
| 747 | - static void Duration(const FunctionCallbackInfo<Value>& args) { | ||
| 748 | - Parser* parser; | ||
| 749 | - ASSIGN_OR_RETURN_UNWRAP(&parser, args.This()); | ||
| 750 | - | ||
| 751 | - if (parser->last_message_start_ == 0) { | ||
| 752 | - args.GetReturnValue().Set(0); | ||
| 753 | - return; | ||
| 754 | - } | ||
| 755 | - | ||
| 756 | - double duration = (uv_hrtime() - parser->last_message_start_) / 1e6; | ||
| 757 | - args.GetReturnValue().Set(duration); | ||
| 758 | - } | ||
| 759 | - | ||
| 760 | - static void HeadersCompleted(const FunctionCallbackInfo<Value>& args) { | ||
| 761 | - Parser* parser; | ||
| 762 | - ASSIGN_OR_RETURN_UNWRAP(&parser, args.This()); | ||
| 763 | - | ||
| 764 | - args.GetReturnValue().Set(parser->headers_completed_); | ||
| 765 | - } | ||
| 766 | - | ||
| 767 | 749 | protected: | |
| 768 | 750 | static const size_t kAllocBufferSize = 64 * 1024; | |
| 769 | 751 | ||
@@ -1316,8 +1298,6 @@ void CreatePerIsolateProperties(IsolateData* isolate_data, | |||
| 1316 | 1298 | SetProtoMethod(isolate, t, "consume", Parser::Consume); | |
| 1317 | 1299 | SetProtoMethod(isolate, t, "unconsume", Parser::Unconsume); | |
| 1318 | 1300 | SetProtoMethod(isolate, t, "getCurrentBuffer", Parser::GetCurrentBuffer); | |
| 1319 | - SetProtoMethod(isolate, t, "duration", Parser::Duration); | ||
| 1320 | - SetProtoMethod(isolate, t, "headersCompleted", Parser::HeadersCompleted); | ||
| 1321 | 1301 | ||
| 1322 | 1302 | SetConstructorFunction(isolate, target, "HTTPParser", t); | |
| 1323 | 1303 | ||
@@ -1387,8 +1367,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { | |||
| 1387 | 1367 | registry->Register(Parser::Consume); | |
| 1388 | 1368 | registry->Register(Parser::Unconsume); | |
| 1389 | 1369 | registry->Register(Parser::GetCurrentBuffer); | |
| 1390 | - registry->Register(Parser::Duration); | ||
| 1391 | - registry->Register(Parser::HeadersCompleted); | ||
| 1392 | 1370 | registry->Register(ConnectionsList::New); | |
| 1393 | 1371 | registry->Register(ConnectionsList::All); | |
| 1394 | 1372 | registry->Register(ConnectionsList::Idle); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments