summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorCristian Cavalli <cristiancavall@google.com>2017-01-19 10:42:00 -0800
committerMyles Borins <mylesborins@google.com>2017-01-31 17:07:50 -0500
commit2a39d1c7a4a124ef558640ac5ac2050a09d58a7c (patch)
treefccd06ea6055a17e6c7286b20adddefeaac1dc16 /deps
parent5c5f5fb4155d16117e3253744cb6be9f602d9cf5 (diff)
downloadnode-new-2a39d1c7a4a124ef558640ac5ac2050a09d58a7c.tar.gz
deps: backport 7c3748a from upstream V8
Original commit message: load correct stack slot for frame details. R=bmeurer@chromium.org BUG=v8:5071 Review URL: https://codereview.chromium.org/2045863002 . Cr-Commit-Position: refs/heads/master@{#36769} PR-URL: https://github.com/nodejs/node/pull/10881 Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/include/v8-version.h2
-rw-r--r--deps/v8/src/runtime/runtime-debug.cc3
-rw-r--r--deps/v8/test/mjsunit/regress/regress-5071.js26
3 files changed, 29 insertions, 2 deletions
diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h
index 489e86cf15..e670d564e6 100644
--- a/deps/v8/include/v8-version.h
+++ b/deps/v8/include/v8-version.h
@@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 5
#define V8_MINOR_VERSION 1
#define V8_BUILD_NUMBER 281
-#define V8_PATCH_LEVEL 92
+#define V8_PATCH_LEVEL 93
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
diff --git a/deps/v8/src/runtime/runtime-debug.cc b/deps/v8/src/runtime/runtime-debug.cc
index 3263a89809..4b98f1488b 100644
--- a/deps/v8/src/runtime/runtime-debug.cc
+++ b/deps/v8/src/runtime/runtime-debug.cc
@@ -584,7 +584,8 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
// Use the value from the stack.
if (scope_info->LocalIsSynthetic(i)) continue;
locals->set(local * 2, scope_info->LocalName(i));
- Handle<Object> value = frame_inspector.GetExpression(i);
+ Handle<Object> value =
+ frame_inspector.GetExpression(scope_info->StackLocalIndex(i));
// TODO(yangguo): We convert optimized out values to {undefined} when they
// are passed to the debugger. Eventually we should handle them somehow.
if (value->IsOptimizedOut()) value = isolate->factory()->undefined_value();
diff --git a/deps/v8/test/mjsunit/regress/regress-5071.js b/deps/v8/test/mjsunit/regress/regress-5071.js
new file mode 100644
index 0000000000..41c1250031
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-5071.js
@@ -0,0 +1,26 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-debug-as debug
+
+var Debug = debug.Debug;
+
+function listener(event, exec_state, event_data, data) {
+ assertEquals(2, exec_state.frameCount());
+ assertEquals("a", exec_state.frame(0).localName(0));
+ assertEquals("1", exec_state.frame(0).localValue(0).value());
+ assertEquals(1, exec_state.frame(0).localCount());
+}
+
+Debug.setListener(listener);
+
+function f() {
+ var a = 1;
+ {
+ let b = 2;
+ debugger;
+ }
+}
+
+f();