Index: src/messages.js |
diff --git a/src/messages.js b/src/messages.js |
index 5310938a6612f75bdd6044b3715d48f879ad2273..cd4add4bcba5fe773f1ff848844bf082e6f6abb3 100644 |
--- a/src/messages.js |
+++ b/src/messages.js |
@@ -1078,9 +1078,9 @@ function captureStackTrace(obj, cons_opt) { |
if (stackTraceLimit < 0 || stackTraceLimit > 10000) { |
stackTraceLimit = 10000; |
} |
- var raw_stack = %CollectStackTrace(cons_opt |
- ? cons_opt |
- : captureStackTrace, stackTraceLimit); |
+ var raw_stack = %CollectStackTrace(obj, |
+ cons_opt ? cons_opt : captureStackTrace, |
+ stackTraceLimit); |
DefineOneShotAccessor(obj, 'stack', function (obj) { |
return FormatRawStackTrace(obj, raw_stack); |
}); |