Index: src/js/messages.js |
diff --git a/src/js/messages.js b/src/js/messages.js |
index 2ff2dd052baaad0256d9a71d6a82c0d811548a66..1e91d28e63dcb2b244e0e16f9671e44058e34a56 100644 |
--- a/src/js/messages.js |
+++ b/src/js/messages.js |
@@ -632,9 +632,10 @@ function CallSiteGetFunctionName() { |
CheckCallSite(this, "getFunctionName"); |
if (HAS_PRIVATE(this, callSiteWasmObjectSymbol)) { |
var wasm = GET_PRIVATE(this, callSiteWasmObjectSymbol); |
- var func_index = GET_PRIVATE(this, callSiteWasmFunctionIndexSymbol); |
if (IS_UNDEFINED(wasm)) return "<WASM>"; |
- return %WasmGetFunctionName(wasm, func_index); |
+ var func_index = GET_PRIVATE(this, callSiteWasmFunctionIndexSymbol); |
+ var func_name = %WasmGetFunctionName(wasm, func_index); |
+ return func_name ? func_name : "<WASM>"; |
Yang
2016/05/09 05:34:55
Can we do a IS_UNDEFINED check if we only expect u
clemensh
2016/05/09 07:38:46
Unfortunately not. At least not without further ch
Yang
2016/05/11 05:49:41
I see. Can we hide this logic inside %WasmGetFunct
|
} |
return %CallSiteGetFunctionNameRT(this); |
} |