1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 08:09:08 -05:00

fix(ext/fetch): don't use global Deno object

Don't use `Deno.core`, it's not present in embedders that don't expose
the Deno global object.
This commit is contained in:
Ben Noordhuis 2021-08-16 12:53:30 +02:00 committed by Luca Casonato
parent eea6f578fc
commit 6ddabb7427

View file

@ -523,15 +523,15 @@
while (true) {
const { value: chunk, done } = await reader.read();
if (done) break;
Deno.core.wasmStreamingFeed(rid, "bytes", chunk);
core.wasmStreamingFeed(rid, "bytes", chunk);
}
}
// 2.7.
Deno.core.wasmStreamingFeed(rid, "finish");
core.wasmStreamingFeed(rid, "finish");
} catch (err) {
// 2.8 and 3
Deno.core.wasmStreamingFeed(rid, "abort", err);
core.wasmStreamingFeed(rid, "abort", err);
}
})();
}