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

Unified Diff: test/mjsunit/es6/debug-blockscopes.js

Issue 1239033002: Debugger: use FrameInspector in ScopeIterator to find context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 5 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 | « src/runtime/runtime-debug.cc ('k') | test/mjsunit/regress/regress-4309-1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/debug-blockscopes.js
diff --git a/test/mjsunit/es6/debug-blockscopes.js b/test/mjsunit/es6/debug-blockscopes.js
index 31208d41f43bf3d63a2530624b362bafc4eb5ab5..3f890ebd546d2edba74066f0fd5e5c031ce91ec6 100644
--- a/test/mjsunit/es6/debug-blockscopes.js
+++ b/test/mjsunit/es6/debug-blockscopes.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --expose-debug-as debug
+// Flags: --expose-debug-as debug --allow-natives-syntax
// The functions used for testing backtraces. They are at the top to make the
// testing of source line/column easier.
@@ -187,6 +187,14 @@ function CheckScopeContent(content, number, exec_state) {
}
+function assertEqualsUnlessOptimized(expected, value, f) {
+ try {
+ assertEquals(expected, value);
+ } catch (e) {
+ assertOptimized(f);
+ }
+}
+
// Simple empty block scope in local scope.
BeginTest("Local block 1");
@@ -517,11 +525,11 @@ function shadowing_1() {
{
let i = 5;
debugger;
- assertEquals(27, i);
+ assertEqualsUnlessOptimized(27, i, shadowing_1);
}
assertEquals(0, i);
debugger;
- assertEquals(27, i);
+ assertEqualsUnlessOptimized(27, i, shadowing_1);
}
listener_delegate = function (exec_state) {
@@ -538,9 +546,9 @@ function shadowing_2() {
{
let j = 5;
debugger;
- assertEquals(27, j);
+ assertEqualsUnlessOptimized(27, j, shadowing_2);
}
- assertEquals(0, i);
+ assertEqualsUnlessOptimized(0, i, shadowing_2);
}
listener_delegate = function (exec_state) {
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/mjsunit/regress/regress-4309-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698