1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00

cleanup(core.js): make op wrapper arg names generic (#10675)

These bits were missed in #10448.
This commit is contained in:
Aaron O'Mullan 2021-05-18 13:43:21 +02:00 committed by GitHub
parent 12bfdef62c
commit 21d62b9b9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,16 +108,16 @@
return res;
}
function opAsync(opName, args = null, zeroCopy = null) {
function opAsync(opName, arg1 = null, arg2 = null) {
const promiseId = nextPromiseId++;
const maybeError = dispatch(opName, promiseId, args, zeroCopy);
const maybeError = dispatch(opName, promiseId, arg1, arg2);
// Handle sync error (e.g: error parsing args)
if (maybeError) return unwrapOpResult(maybeError);
return setPromise(promiseId).then(unwrapOpResult);
}
function opSync(opName, args = null, zeroCopy = null) {
return unwrapOpResult(dispatch(opName, null, args, zeroCopy));
function opSync(opName, arg1 = null, arg2 = null) {
return unwrapOpResult(dispatch(opName, null, arg1, arg2));
}
function resources() {