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

Side by Side Diff: test/mjsunit/harmony/debug-evaluate-blockscopes.js

Issue 732543002: Implement 'setVariableValue' for debugger block scopes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Add the debug event listener. 60 // Add the debug event listener.
61 Debug.setListener(listener); 61 Debug.setListener(listener);
62 result = -1; 62 result = -1;
63 f(); 63 f();
64 assertEquals(1, result); 64 assertEquals(1, result);
65 65
66 // Clear breakpoint. 66 // Clear breakpoint.
67 Debug.clearBreakPoint(bp); 67 Debug.clearBreakPoint(bp);
68 // Get rid of the debug event listener. 68 // Get rid of the debug event listener.
69 Debug.setListener(null); 69 Debug.setListener(null);
70
71
72 function f1() {
73 {
74 let i = 1;
rossberg 2014/11/14 12:35:24 Considering stack allocated block variables being
Dmitry Lomov (no reviews) 2014/11/14 13:38:26 Done.
75 debugger;
76 assertEquals(2, i);
77 }
78 }
79
80 var exception;
81 Debug.setListener(function (event, exec_state, event_data, data) {
82 try {
83 if (event == Debug.DebugEvent.Break) {
84 var frame = exec_state.frame();
85 assertEquals(1, frame.evaluate("i").value());
86 var allScopes = frame.allScopes();
87 assertEquals(1, allScopes[0].scopeObject().value().i);
88 allScopes[0].setVariableValue('i', 2);
aandrey 2014/11/14 12:39:58 nit: ' or " (see 3 lines above)
Dmitry Lomov (no reviews) 2014/11/14 13:38:27 Done.
89 }
90 } catch (e) {
91 exception = e;
92 }
93 });
94
95 exception = null;
96 f1();
97 assertEquals(null, exception, exception);
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698