Skip to content

Commit

Permalink
deps: cherry-pick 7bd24767 from v8 upstream (v6.x)
Browse files Browse the repository at this point in the history
Original commit message:

    Version 5.1.281.65 (cherry-pick)

    Merged 85b8c2dc4aee1031ac02f9d7c02d5c1aa76bc2ba

    Fix observable array access when formatting stack trace.

    BUG=chromium:617527
    LOG=N
    R=hablich@chromium.org

    Review URL: https://codereview.chromium.org/2051383002 .

    Cr-Commit-Position: refs/branch-heads/5.1@{nodejs#76}
    Cr-Branched-From: 167dc63b4c9a1d0f0fe1b19af93644ac9a561e83-refs/heads/5.1.281@{#1}
    Cr-Branched-From: 03953f52bd4a184983a551927c406be6489ef89b-refs/heads/master@{nodejs#35282}

PR-URL: nodejs#8078
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
  • Loading branch information
fhinkel committed Aug 17, 2016
1 parent 5cff147 commit 08e2b04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 5
#define V8_MINOR_VERSION 0
#define V8_BUILD_NUMBER 71
#define V8_PATCH_LEVEL 60
#define V8_PATCH_LEVEL 61

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
14 changes: 8 additions & 6 deletions deps/v8/src/js/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -782,13 +782,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)));
Expand Down

0 comments on commit 08e2b04

Please sign in to comment.