Index: src/js/messages.js |
diff --git a/src/js/messages.js b/src/js/messages.js |
index f8cb967cdd064238ebbe75bf50edc2be168271f6..4529981c30db82bc1230f193d764bf6fd7bfc378 100644 |
--- a/src/js/messages.js |
+++ b/src/js/messages.js |
@@ -795,13 +795,15 @@ function FormatErrorString(error) { |
function GetStackFrames(raw_stack) { |
+ var internal_raw_stack = new InternalArray(); |
+ %MoveArrayContents(raw_stack, internal_raw_stack); |
var frames = new InternalArray(); |
- var sloppy_frames = raw_stack[0]; |
- for (var i = 1; i < raw_stack.length; i += 4) { |
- var recv = raw_stack[i]; |
- var fun = raw_stack[i + 1]; |
- var code = raw_stack[i + 2]; |
- var pc = raw_stack[i + 3]; |
+ var sloppy_frames = internal_raw_stack[0]; |
+ for (var i = 1; i < internal_raw_stack.length; i += 4) { |
+ var recv = internal_raw_stack[i]; |
+ var fun = internal_raw_stack[i + 1]; |
+ var code = internal_raw_stack[i + 2]; |
+ var pc = internal_raw_stack[i + 3]; |
var pos = %_IsSmi(code) ? code : %FunctionGetPositionForOffset(code, pc); |
sloppy_frames--; |
frames.push(new CallSite(recv, fun, pos, (sloppy_frames < 0))); |