summaryrefslogtreecommitdiff
path: root/core/isolate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/isolate.rs')
-rw-r--r--core/isolate.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/core/isolate.rs b/core/isolate.rs
index 50fcadb48..9c13f0e4d 100644
--- a/core/isolate.rs
+++ b/core/isolate.rs
@@ -900,7 +900,7 @@ pub mod tests {
"setup2.js",
r#"
let nrecv = 0;
- Deno.core.setAsyncHandler((opId, buf) => {
+ Deno.core.setAsyncHandler(1, (buf) => {
nrecv++;
});
"#,
@@ -1021,7 +1021,7 @@ pub mod tests {
"overflow_req_sync.js",
r#"
let asyncRecv = 0;
- Deno.core.setAsyncHandler((opId, buf) => { asyncRecv++ });
+ Deno.core.setAsyncHandler(1, (buf) => { asyncRecv++ });
// Large message that will overflow the shared space.
let control = new Uint8Array(100 * 1024 * 1024);
let response = Deno.core.dispatch(1, control);
@@ -1043,7 +1043,7 @@ pub mod tests {
"overflow_res_sync.js",
r#"
let asyncRecv = 0;
- Deno.core.setAsyncHandler((opId, buf) => { asyncRecv++ });
+ Deno.core.setAsyncHandler(1, (buf) => { asyncRecv++ });
// Large message that will overflow the shared space.
let control = new Uint8Array([42]);
let response = Deno.core.dispatch(1, control);
@@ -1064,8 +1064,7 @@ pub mod tests {
"overflow_req_async.js",
r#"
let asyncRecv = 0;
- Deno.core.setAsyncHandler((opId, buf) => {
- assert(opId == 1);
+ Deno.core.setAsyncHandler(1, (buf) => {
assert(buf.byteLength === 4);
assert(buf[0] === 43);
asyncRecv++;
@@ -1097,8 +1096,7 @@ pub mod tests {
"overflow_res_async.js",
r#"
let asyncRecv = 0;
- Deno.core.setAsyncHandler((opId, buf) => {
- assert(opId == 1);
+ Deno.core.setAsyncHandler(1, (buf) => {
assert(buf.byteLength === 100 * 1024 * 1024);
assert(buf[0] === 4);
asyncRecv++;
@@ -1126,8 +1124,7 @@ pub mod tests {
"overflow_res_multiple_dispatch_async.js",
r#"
let asyncRecv = 0;
- Deno.core.setAsyncHandler((opId, buf) => {
- assert(opId === 1);
+ Deno.core.setAsyncHandler(1, (buf) => {
assert(buf.byteLength === 100 * 1024 * 1024);
assert(buf[0] === 4);
asyncRecv++;