Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: src/js/messages.js

Issue 2044823002: Fix observable array access when formatting stack trace. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/messages.js
diff --git a/src/js/messages.js b/src/js/messages.js
index 439043f809c5b50151c3313ed8e6b88e9e484d11..24d8d2bfa188bf3544e03083597e1dd7edd8ea2d 100644
--- a/src/js/messages.js
+++ b/src/js/messages.js
@@ -530,13 +530,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];
// For traps in wasm, the bytecode offset is passed as (-1 - offset).
// Otherwise, lookup the position from the pc.
var pos = IS_NUMBER(fun) && pc < 0 ? (-1 - pc) :
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698