refactor(ext/net): clean up variadic network ops (#16392)

Previously `op_net_listen`, `op_net_accept`, and various other ops in
ext/net where variadic on the transport. This created a lot of code
bloat. This commit updates the code to instead have separate ops for
each transport.
This commit is contained in:
Luca Casonato 2022-10-24 14:55:39 +02:00 committed by GitHub
parent f38666f5a3
commit c061538417
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 472 additions and 728 deletions

View file

@ -57,6 +57,7 @@ delete Intl.v8BreakIterator;
const worker = window.__bootstrap.worker;
const internals = window.__bootstrap.internals;
const performance = window.__bootstrap.performance;
const net = window.__bootstrap.net;
const crypto = window.__bootstrap.crypto;
const url = window.__bootstrap.url;
const urlPattern = window.__bootstrap.urlPattern;
@ -682,6 +683,8 @@ delete Intl.v8BreakIterator;
}
performance.setTimeOrigin(DateNow());
net.setup(runtimeOptions.unstableFlag);
const consoleFromV8 = window.console;
const wrapConsole = window.__bootstrap.console.wrapConsole;
@ -779,6 +782,8 @@ delete Intl.v8BreakIterator;
}
performance.setTimeOrigin(DateNow());
net.setup(runtimeOptions.unstableFlag);
const consoleFromV8 = window.console;
const wrapConsole = window.__bootstrap.console.wrapConsole;