| Index: src/js/messages.js
|
| diff --git a/src/js/messages.js b/src/js/messages.js
|
| index d48bd5cfbbf6d5b5b8a181f0c595f148790a12fe..439043f809c5b50151c3313ed8e6b88e9e484d11 100644
|
| --- a/src/js/messages.js
|
| +++ b/src/js/messages.js
|
| @@ -275,8 +275,8 @@ function GetStackTraceLine(recv, fun, pos, isGlobal) {
|
| function CallSite(receiver, fun, pos, strict_mode) {
|
| // For wasm frames, receiver is the wasm object and fun is the function index
|
| // instead of an actual function.
|
| - if (!IS_FUNCTION(fun) && !IS_NUMBER(fun)) {
|
| - throw MakeTypeError(kCallSiteExpectsFunction, typeof fun);
|
| + if (!IS_FUNCTION(fun) && !%IsWasmObject(receiver)) {
|
| + throw MakeTypeError(kCallSiteExpectsFunction, typeof receiver, typeof fun);
|
| }
|
|
|
| if (IS_UNDEFINED(new.target)) {
|
|
|