diff --git a/NOTICE b/NOTICE index 3160d03559..81d66167db 100644 --- a/NOTICE +++ b/NOTICE @@ -44,6 +44,7 @@ under the licensing terms detailed in LICENSE: * Felipe Gasper * Congcong Cai <77575210+HerrCai0907@users.noreply.github.com> * mooooooi +* Yasushi Ando Portions of this software are derived from third-party works licensed under the following terms: diff --git a/src/bindings/js.ts b/src/bindings/js.ts index 768a435ec8..a0590e0ab0 100644 --- a/src/bindings/js.ts +++ b/src/bindings/js.ts @@ -950,7 +950,7 @@ export class JSBuilder extends ExportsWalker { /** Lifts a WebAssembly value to a JavaScript value. */ makeLiftFromValue(name: string, type: Type, sb: string[] = this.sb): void { if (type.isInternalReference) { - const clazz = assert(type.getClass()); + const clazz = assert(type.getClassOrWrapper(this.program)); if (clazz.extends(this.program.arrayBufferInstance.prototype)) { sb.push("__liftBuffer("); this.needsLiftBuffer = true; diff --git a/src/bindings/tsd.ts b/src/bindings/tsd.ts index be7563839a..ffab273e0b 100644 --- a/src/bindings/tsd.ts +++ b/src/bindings/tsd.ts @@ -236,7 +236,7 @@ export class TSDBuilder extends ExportsWalker { toTypeScriptType(type: Type, mode: Mode): string { if (type.isInternalReference) { const sb = new Array(); - const clazz = assert(type.getClass()); + const clazz = assert(type.getClassOrWrapper(this.program)); if (clazz.extends(this.program.arrayBufferInstance.prototype)) { sb.push("ArrayBuffer"); } else if (clazz.extends(this.program.stringInstance.prototype)) {