| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 81cb14b commit 31994fb
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -81,6 +81,7 @@ class ExternalReferenceRegistry { | |||
| 81 | 81 | V(types) \ | |
| 82 | 82 | V(uv) \ | |
| 83 | 83 | V(v8) \ | |
| 84 | + V(zlib) \ | ||
| 84 | 85 | V(worker) | |
| 85 | 86 | ||
| 86 | 87 | #if NODE_HAVE_I18N_SUPPORT | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | 26 | #include "async_wrap-inl.h" | |
| 27 | 27 | #include "env-inl.h" | |
| 28 | + #include "node_external_reference.h" | ||
| 28 | 29 | #include "threadpoolwork-inl.h" | |
| 29 | 30 | #include "util-inl.h" | |
| 30 | 31 | ||
@@ -1266,6 +1267,16 @@ struct MakeClass { | |||
| 1266 | 1267 | ||
| 1267 | 1268 | env->SetConstructorFunction(target, name, z); | |
| 1268 | 1269 | } | |
| 1270 | + | ||
| 1271 | + static void Make(ExternalReferenceRegistry* registry) { | ||
| 1272 | + registry->Register(Stream::New); | ||
| 1273 | + registry->Register(Stream::template Write<true>); | ||
| 1274 | + registry->Register(Stream::template Write<false>); | ||
| 1275 | + registry->Register(Stream::Close); | ||
| 1276 | + registry->Register(Stream::Init); | ||
| 1277 | + registry->Register(Stream::Params); | ||
| 1278 | + registry->Register(Stream::Reset); | ||
| 1279 | + } | ||
| 1269 | 1280 | }; | |
| 1270 | 1281 | ||
| 1271 | 1282 | void Initialize(Local<Object> target, | |
@@ -1283,6 +1294,12 @@ void Initialize(Local<Object> target, | |||
| 1283 | 1294 | FIXED_ONE_BYTE_STRING(env->isolate(), ZLIB_VERSION)).Check(); | |
| 1284 | 1295 | } | |
| 1285 | 1296 | ||
| 1297 | + void RegisterExternalReferences(ExternalReferenceRegistry* registry) { | ||
| 1298 | + MakeClass<ZlibStream>::Make(registry); | ||
| 1299 | + MakeClass<BrotliEncoderStream>::Make(registry); | ||
| 1300 | + MakeClass<BrotliDecoderStream>::Make(registry); | ||
| 1301 | + } | ||
| 1302 | + | ||
| 1286 | 1303 | } // anonymous namespace | |
| 1287 | 1304 | ||
| 1288 | 1305 | void DefineZlibConstants(Local<Object> target) { | |
@@ -1408,3 +1425,4 @@ void DefineZlibConstants(Local<Object> target) { | |||
| 1408 | 1425 | } // namespace node | |
| 1409 | 1426 | ||
| 1410 | 1427 | NODE_MODULE_CONTEXT_AWARE_INTERNAL(zlib, node::Initialize) | |
| 1428 | + NODE_MODULE_EXTERNAL_REFERENCE(zlib, node::RegisterExternalReferences) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments