Skip to content

Commit e65c270

Browse files
pquernary
authored andcommitted
Move http parser to extension model.
1 parent e51aef7 commit e65c270

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/node.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,10 +1597,6 @@ static Handle<Value> Binding(const Arguments& args) {
15971597
StatWatcher::Initialize(exports);
15981598
File::Initialize(exports);
15991599
binding_cache->Set(module, exports);
1600-
} else if (!strcmp(*module_v, "http_parser")) {
1601-
exports = Object::New();
1602-
InitHttpParser(exports);
1603-
binding_cache->Set(module, exports);
16041600
} else if (!strcmp(*module_v, "child_process")) {
16051601
exports = Object::New();
16061602
ChildProcess::Initialize(exports);

src/node_extensions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ NODE_EXT_LIST_ITEM(node_cares)
55
NODE_EXT_LIST_ITEM(node_crypto)
66
#endif
77
NODE_EXT_LIST_ITEM(node_net)
8+
NODE_EXT_LIST_ITEM(node_http_parser)
89
NODE_EXT_LIST_ITEM(node_signal_watcher)
910
NODE_EXT_LIST_ITEM(node_stdio)
1011
NODE_EXT_LIST_END

src/node_http_parser.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,3 +473,4 @@ void InitHttpParser(Handle<Object> target) {
473473

474474
} // namespace node
475475

476+
NODE_MODULE(node_http_parser, node::InitHttpParser);

0 commit comments

Comments
 (0)