Compare commits
No commits in common. "68283d14e52f81daea9f1aca11e32f6695f5ab0c" and "c69420ae900bfab61e56573ad1a60d4fcea75620" have entirely different histories.
68283d14e5
...
c69420ae90
|
@ -82,7 +82,6 @@ export default class Go {
|
|||
private exited = false;
|
||||
private _resolveCallbackPromise?: () => void;
|
||||
importObject: ImportObject;
|
||||
private _pendingEvent?: any;
|
||||
|
||||
constructor() {
|
||||
this._callbackTimeouts = new Map();
|
||||
|
@ -438,16 +437,6 @@ export default class Go {
|
|||
}
|
||||
this._inst.exports.resume();
|
||||
}
|
||||
_makeFuncWrapper(id) {
|
||||
const go = this;
|
||||
return function () {
|
||||
const event = { id: id, this: this, args: arguments };
|
||||
go._pendingEvent = event;
|
||||
go._resume();
|
||||
// @ts-ignore
|
||||
return event.result;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
|
|
|
@ -89,7 +89,7 @@ func start() int {
|
|||
return callbackId
|
||||
}
|
||||
|
||||
//export exit
|
||||
// exit write
|
||||
func exit() {
|
||||
exitChan <- true
|
||||
}
|
||||
|
|
|
@ -12,13 +12,6 @@ export async function getVerifiableStream(
|
|||
const reader = new VariableChunkStream(data);
|
||||
let bytesToRead;
|
||||
|
||||
if (root instanceof ArrayBuffer) {
|
||||
root = new Uint8Array(root);
|
||||
}
|
||||
if (proof instanceof ArrayBuffer) {
|
||||
proof = new Uint8Array(proof);
|
||||
}
|
||||
|
||||
const getNextBytes = async () => {
|
||||
bytesToRead = getWasmProperty(wasmId, "write_promise");
|
||||
bytesToRead = await bytesToRead;
|
||||
|
@ -74,9 +67,9 @@ export async function getVerifiableStream(
|
|||
|
||||
const result = getWasmProperty(wasmId, "result");
|
||||
|
||||
const wasmDone = result !== undefined;
|
||||
const wasmDone = result === undefined;
|
||||
|
||||
if (!wasmDone) {
|
||||
if (result === undefined) {
|
||||
await getNextBytes();
|
||||
}
|
||||
|
||||
|
@ -91,8 +84,6 @@ export async function getVerifiableStream(
|
|||
done(controller);
|
||||
}
|
||||
}
|
||||
|
||||
controller.enqueue(chunk.value);
|
||||
},
|
||||
async cancel(reason: any) {
|
||||
await reader.cancel(reason);
|
||||
|
|
Loading…
Reference in New Issue