Changeset 260520 in webkit
- Timestamp:
- Apr 22, 2020 10:24:14 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r260513 r260520 1 2020-04-22 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Debugger: Step Over should only step through comma expressions if they are comma statements 4 https://bugs.webkit.org/show_bug.cgi?id=210588 5 6 Reviewed by Brian Burg. 7 8 * inspector/debugger/resources/log-pause-location.js: 9 (TestPage.registerInitializer.window.step): 10 * inspector/debugger/breakpoints/resources/dump-functions.js: 11 * inspector/debugger/breakpoints/resources/dump-general.js: 12 * inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt: 13 * inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt: 14 * inspector/debugger/stepping/stepInto.html: 15 * inspector/debugger/stepping/stepInto-expected.txt: 16 * inspector/debugger/stepping/stepNext.html: 17 * inspector/debugger/stepping/stepNext-expected.txt: 18 * inspector/debugger/stepping/stepOut.html: 19 * inspector/debugger/stepping/stepOut-expected.txt: 20 * inspector/debugger/stepping/stepOver.html: 21 * inspector/debugger/stepping/stepOver-expected.txt: 22 * inspector/debugger/stepping/stepping-control-flow.html: 23 * inspector/debugger/stepping/stepping-control-flow-expected.txt: 24 * inspector/debugger/stepping/stepping-loops.html: 25 * inspector/debugger/stepping/stepping-loops-expected.txt: 26 * inspector/formatting/resources/javascript-tests/arrow-functions.js: 27 * inspector/formatting/resources/javascript-tests/arrow-functions-expected.js: 28 * inspector/formatting/resources/javascript-tests/functions.js: 29 * inspector/formatting/resources/javascript-tests/functions-expected.js: 30 * inspector/formatting/resources/javascript-tests/try-catch-finally-statements.js: 31 * inspector/formatting/resources/javascript-tests/try-catch-finally-statements-expected.js: 32 1 33 2020-04-22 Antoine Quint <graouts@apple.com> 2 34 -
trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt
r259810 r260520 1412 1412 215 c(); 1413 1413 216 1414 217 true && (a(), b(), c()) ;1414 217 true && (a(), b(), c()) && true; 1415 1415 1416 1416 INSERTING AT: 214:1 … … 1422 1422 => 215 |c(); 1423 1423 216 1424 217 true && (a(), b(), c()) ;1424 217 true && (a(), b(), c()) && true; 1425 1425 218 1426 1426 … … 1432 1432 -> 215 c#(); 1433 1433 216 1434 => 217 |true && (a(), b(), c()) ;1434 => 217 |true && (a(), b(), c()) && true; 1435 1435 218 1436 219 true && ( 1437 220 a(), 1436 1438 1437 1439 INSERTING AT: 217:1 1438 PAUSES AT: 21 7:91440 PAUSES AT: 219:0 1439 1441 214 b(), 1440 1442 215 c(); 1441 1443 216 1442 -=> 217 t#rue && (|a(), b(), c());1444 -> 217 t#rue && (a(), b(), c()) && true; 1443 1445 218 1444 1445 INSERTING AT: 217:10 1446 PAUSES AT: 217:14 1447 214 b(), 1448 215 c(); 1446 => 219 |true && ( 1447 220 a(), 1448 221 b(), 1449 222 c() 1450 1451 INSERTING AT: 219:1 1452 PAUSES AT: 226:4 1449 1453 216 1450 -=> 217 true && (a#(), |b(), c());1454 217 true && (a(), b(), c()) && true; 1451 1455 218 1452 1453 INSERTING AT: 217:15 1454 PAUSES AT: 217:19 1455 214 b(), 1456 215 c(); 1457 216 1458 -=> 217 true && (a(), b#(), |c()); 1459 218 1456 -> 219 t#rue && ( 1457 220 a(), 1458 221 b(), 1459 222 c() 1460 223 ) && true; 1461 224 1462 225 try { 1463 => 226 |throw a(), b(), c(); 1464 227 } catch { } 1465 228 1466 229 try { 1467 1468 INSERTING AT: 226:5 1469 PAUSES AT: 226:10 1470 223 ) && true; 1471 224 1472 225 try { 1473 -=> 226 t#hrow |a(), b(), c(); 1474 227 } catch { } 1475 228 1476 229 try { 1477 1478 INSERTING AT: 226:11 1479 PAUSES AT: 226:15 1480 223 ) && true; 1481 224 1482 225 try { 1483 -=> 226 throw a#(), |b(), c(); 1484 227 } catch { } 1485 228 1486 229 try { 1487 1488 INSERTING AT: 226:16 1489 PAUSES AT: 226:20 1490 223 ) && true; 1491 224 1492 225 try { 1493 -=> 226 throw a(), b#(), |c(); 1494 227 } catch { } 1495 228 1496 229 try { 1497 1498 INSERTING AT: 226:21 1499 PAUSES AT: 230:4 1500 223 ) && true; 1501 224 1502 225 try { 1503 -> 226 throw a(), b(), c#(); 1504 227 } catch { } 1505 228 1506 229 try { 1507 => 230 |throw a(), 1508 231 b(), 1509 232 c(); 1510 233 } catch { } 1511 1512 INSERTING AT: 230:5 1513 PAUSES AT: 230:10 1514 227 } catch { } 1515 228 1516 229 try { 1517 -=> 230 t#hrow |a(), 1518 231 b(), 1519 232 c(); 1520 233 } catch { } 1521 1522 INSERTING AT: 230:11 1523 PAUSES AT: 231:8 1524 227 } catch { } 1525 228 1526 229 try { 1527 -> 230 throw a#(), 1528 => 231 |b(), 1529 232 c(); 1530 233 } catch { } 1531 234 1532 1533 INSERTING AT: 231:9 1534 PAUSES AT: 232:8 1535 228 1536 229 try { 1537 230 throw a(), 1538 -> 231 b#(), 1539 => 232 |c(); 1540 233 } catch { } 1541 234 1460 1542 1461 1543 … … 2575 2657 123 } 2576 2658 124 2659 125 function returnOneLine() { 2577 2660 2578 2661 INSERTING AT: 122:5 … … 2584 2667 => 123 |} 2585 2668 124 2669 125 function returnOneLine() { 2670 126 return inline(), inline(), inline(); 2671 2672 INSERTING AT: 125:0 2673 PAUSES AT: 126:4 2674 122 inline(); 2675 123 } 2676 124 2677 -> 125 #function returnOneLine() { 2678 => 126 |return inline(), inline(), inline(); 2679 127 } 2680 128 2681 129 function returnMultiLine() { 2682 2683 INSERTING AT: 126:5 2684 PAUSES AT: 126:11 2685 123 } 2686 124 2687 125 function returnOneLine() { 2688 -=> 126 r#eturn |inline(), inline(), inline(); 2689 127 } 2690 128 2691 129 function returnMultiLine() { 2692 2693 INSERTING AT: 126:12 2694 PAUSES AT: 126:21 2695 123 } 2696 124 2697 125 function returnOneLine() { 2698 -=> 126 return i#nline(), |inline(), inline(); 2699 127 } 2700 128 2701 129 function returnMultiLine() { 2702 2703 INSERTING AT: 126:22 2704 PAUSES AT: 126:31 2705 123 } 2706 124 2707 125 function returnOneLine() { 2708 -=> 126 return inline(), i#nline(), |inline(); 2709 127 } 2710 128 2711 129 function returnMultiLine() { 2712 2713 INSERTING AT: 126:32 2714 PAUSES AT: 127:0 2715 123 } 2716 124 2717 125 function returnOneLine() { 2718 -> 126 return inline(), inline(), i#nline(); 2719 => 127 |} 2720 128 2721 129 function returnMultiLine() { 2722 130 return inline(), 2723 2724 INSERTING AT: 129:0 2725 PAUSES AT: 130:4 2726 126 return inline(), inline(), inline(); 2727 127 } 2728 128 2729 -> 129 #function returnMultiLine() { 2730 => 130 |return inline(), 2731 131 inline(), 2732 132 inline(); 2733 133 } 2734 2735 INSERTING AT: 130:5 2736 PAUSES AT: 130:11 2737 127 } 2738 128 2739 129 function returnMultiLine() { 2740 -=> 130 r#eturn |inline(), 2741 131 inline(), 2742 132 inline(); 2743 133 } 2744 2745 INSERTING AT: 130:12 2746 PAUSES AT: 131:8 2747 127 } 2748 128 2749 129 function returnMultiLine() { 2750 -> 130 return i#nline(), 2751 => 131 |inline(), 2752 132 inline(); 2753 133 } 2754 134 2755 2756 INSERTING AT: 131:9 2757 PAUSES AT: 132:8 2758 128 2759 129 function returnMultiLine() { 2760 130 return inline(), 2761 -> 131 i#nline(), 2762 => 132 |inline(); 2763 133 } 2764 134 2765 2766 INSERTING AT: 132:9 2767 PAUSES AT: 133:0 2768 129 function returnMultiLine() { 2769 130 return inline(), 2770 131 inline(), 2771 -> 132 i#nline(); 2772 => 133 |} 2773 134 2586 2774 2587 2775 -
trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt
r259810 r260520 3094 3094 215 c(); 3095 3095 216 3096 217 true && (a(), b(), c()) ;3096 217 true && (a(), b(), c()) && true; 3097 3097 3098 3098 … … 3104 3104 -=> 215 |c(); 3105 3105 216 3106 217 true && (a(), b(), c()) ;3106 217 true && (a(), b(), c()) && true; 3107 3107 218 3108 3108 … … 3114 3114 215 c(); 3115 3115 -> 216 # 3116 => 217 |true && (a(), b(), c()) ;3116 => 217 |true && (a(), b(), c()) && true; 3117 3117 218 3118 219 true && ( 3119 220 a(), 3118 3120 3119 3121 … … 3123 3125 215 c(); 3124 3126 216 3125 -=> 217 |true && (a(), b(), c()) ;3127 -=> 217 |true && (a(), b(), c()) && true; 3126 3128 218 3129 219 true && ( 3130 220 a(), 3127 3131 3128 3132 3129 3133 INSERTING AT: 218:0 3134 PAUSES AT: 219:0 3135 215 c(); 3136 216 3137 217 true && (a(), b(), c()) && true; 3138 -> 218 # 3139 => 219 |true && ( 3140 220 a(), 3141 221 b(), 3142 222 c() 3143 3144 3145 INSERTING AT: 219:0 3146 PAUSES AT: 219:0 3147 216 3148 217 true && (a(), b(), c()) && true; 3149 218 3150 -=> 219 |true && ( 3151 220 a(), 3152 221 b(), 3153 222 c() 3154 3155 3156 INSERTING AT: 220:0 3157 PAUSES AT: 226:4 3158 217 true && (a(), b(), c()) && true; 3159 218 3160 219 true && ( 3161 -> 220 # a(), 3162 221 b(), 3163 222 c() 3164 223 ) && true; 3165 224 3166 225 try { 3167 => 226 |throw a(), b(), c(); 3168 227 } catch { } 3169 228 3170 229 try { 3171 3172 3173 INSERTING AT: 221:0 3174 PAUSES AT: 226:4 3175 218 3176 219 true && ( 3177 220 a(), 3178 -> 221 # b(), 3179 222 c() 3180 223 ) && true; 3181 224 3182 225 try { 3183 => 226 |throw a(), b(), c(); 3184 227 } catch { } 3185 228 3186 229 try { 3187 3188 3189 INSERTING AT: 222:0 3190 PAUSES AT: 226:4 3191 219 true && ( 3192 220 a(), 3193 221 b(), 3194 -> 222 # c() 3195 223 ) && true; 3196 224 3197 225 try { 3198 => 226 |throw a(), b(), c(); 3199 227 } catch { } 3200 228 3201 229 try { 3202 3203 3204 INSERTING AT: 223:0 3205 PAUSES AT: 226:4 3206 220 a(), 3207 221 b(), 3208 222 c() 3209 -> 223 #) && true; 3210 224 3211 225 try { 3212 => 226 |throw a(), b(), c(); 3213 227 } catch { } 3214 228 3215 229 try { 3216 3217 3218 INSERTING AT: 224:0 3219 PAUSES AT: 226:4 3220 221 b(), 3221 222 c() 3222 223 ) && true; 3223 -> 224 # 3224 225 try { 3225 => 226 |throw a(), b(), c(); 3226 227 } catch { } 3227 228 3228 229 try { 3229 3230 3231 INSERTING AT: 225:0 3232 PAUSES AT: 226:4 3233 222 c() 3234 223 ) && true; 3235 224 3236 -> 225 #try { 3237 => 226 |throw a(), b(), c(); 3238 227 } catch { } 3239 228 3240 229 try { 3241 3242 3243 INSERTING AT: 226:0 3244 PAUSES AT: 226:4 3245 223 ) && true; 3246 224 3247 225 try { 3248 -=> 226 # |throw a(), b(), c(); 3249 227 } catch { } 3250 228 3251 229 try { 3252 3253 3254 INSERTING AT: 227:0 3255 PAUSES AT: 230:4 3256 224 3257 225 try { 3258 226 throw a(), b(), c(); 3259 -> 227 #} catch { } 3260 228 3261 229 try { 3262 => 230 |throw a(), 3263 231 b(), 3264 232 c(); 3265 233 } catch { } 3266 3267 3268 INSERTING AT: 228:0 3269 PAUSES AT: 230:4 3270 225 try { 3271 226 throw a(), b(), c(); 3272 227 } catch { } 3273 -> 228 # 3274 229 try { 3275 => 230 |throw a(), 3276 231 b(), 3277 232 c(); 3278 233 } catch { } 3279 3280 3281 INSERTING AT: 229:0 3282 PAUSES AT: 230:4 3283 226 throw a(), b(), c(); 3284 227 } catch { } 3285 228 3286 -> 229 #try { 3287 => 230 |throw a(), 3288 231 b(), 3289 232 c(); 3290 233 } catch { } 3291 3292 3293 INSERTING AT: 230:0 3294 PAUSES AT: 230:4 3295 227 } catch { } 3296 228 3297 229 try { 3298 -=> 230 # |throw a(), 3299 231 b(), 3300 232 c(); 3301 233 } catch { } 3302 3303 3304 INSERTING AT: 231:0 3305 PAUSES AT: 231:8 3306 228 3307 229 try { 3308 230 throw a(), 3309 -=> 231 # |b(), 3310 232 c(); 3311 233 } catch { } 3312 234 3313 3314 3315 INSERTING AT: 232:0 3316 PAUSES AT: 232:8 3317 229 try { 3318 230 throw a(), 3319 231 b(), 3320 -=> 232 # |c(); 3321 233 } catch { } 3322 234 3323 3324 3325 INSERTING AT: 233:0 3326 PRODUCES: Could not resolve breakpoint 3327 3328 INSERTING AT: 234:0 3130 3329 PRODUCES: Could not resolve breakpoint 3131 3330 … … 4616 4815 123 } 4617 4816 124 4817 125 function returnOneLine() { 4618 4818 4619 4819 … … 4625 4825 -=> 123 |} 4626 4826 124 4827 125 function returnOneLine() { 4828 126 return inline(), inline(), inline(); 4627 4829 4628 4830 4629 4831 INSERTING AT: 124:0 4832 PRODUCES: Could not resolve breakpoint 4833 4834 INSERTING AT: 125:0 4835 PAUSES AT: 126:4 4836 122 inline(); 4837 123 } 4838 124 4839 -> 125 #function returnOneLine() { 4840 => 126 |return inline(), inline(), inline(); 4841 127 } 4842 128 4843 129 function returnMultiLine() { 4844 4845 4846 INSERTING AT: 126:0 4847 PAUSES AT: 126:4 4848 123 } 4849 124 4850 125 function returnOneLine() { 4851 -=> 126 # |return inline(), inline(), inline(); 4852 127 } 4853 128 4854 129 function returnMultiLine() { 4855 4856 4857 INSERTING AT: 127:0 4858 PAUSES AT: 127:0 4859 124 4860 125 function returnOneLine() { 4861 126 return inline(), inline(), inline(); 4862 -=> 127 |} 4863 128 4864 129 function returnMultiLine() { 4865 130 return inline(), 4866 4867 4868 INSERTING AT: 128:0 4869 PRODUCES: Could not resolve breakpoint 4870 4871 INSERTING AT: 129:0 4872 PAUSES AT: 130:4 4873 126 return inline(), inline(), inline(); 4874 127 } 4875 128 4876 -> 129 #function returnMultiLine() { 4877 => 130 |return inline(), 4878 131 inline(), 4879 132 inline(); 4880 133 } 4881 4882 4883 INSERTING AT: 130:0 4884 PAUSES AT: 130:4 4885 127 } 4886 128 4887 129 function returnMultiLine() { 4888 -=> 130 # |return inline(), 4889 131 inline(), 4890 132 inline(); 4891 133 } 4892 4893 4894 INSERTING AT: 131:0 4895 PAUSES AT: 131:8 4896 128 4897 129 function returnMultiLine() { 4898 130 return inline(), 4899 -=> 131 # |inline(), 4900 132 inline(); 4901 133 } 4902 134 4903 4904 4905 INSERTING AT: 132:0 4906 PAUSES AT: 132:8 4907 129 function returnMultiLine() { 4908 130 return inline(), 4909 131 inline(), 4910 -=> 132 # |inline(); 4911 133 } 4912 134 4913 4914 4915 INSERTING AT: 133:0 4916 PAUSES AT: 133:0 4917 130 return inline(), 4918 131 inline(), 4919 132 inline(); 4920 -=> 133 |} 4921 134 4922 4923 4924 INSERTING AT: 134:0 4630 4925 PRODUCES: Could not resolve breakpoint 4631 4926 -
trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-functions.js
r259781 r260520 123 123 inline(); 124 124 } 125 126 function returnOneLine() { 127 return inline(), inline(), inline(); 128 } 129 130 function returnMultiLine() { 131 return inline(), 132 inline(), 133 inline(); 134 } -
trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-general.js
r259810 r260520 216 216 c(); 217 217 218 true && (a(), b(), c()); 218 true && (a(), b(), c()) && true; 219 220 true && ( 221 a(), 222 b(), 223 c() 224 ) && true; 225 226 try { 227 throw a(), b(), c(); 228 } catch { } 229 230 try { 231 throw a(), 232 b(), 233 c(); 234 } catch { } -
trunk/LayoutTests/inspector/debugger/resources/log-pause-location.js
r249831 r260520 156 156 WI.debuggerManager.stepOut(); 157 157 break; 158 case "next": 159 InspectorTest.log("ACTION: step-next"); 160 WI.debuggerManager.stepNext(); 161 break; 158 162 case "resume": 159 163 InspectorTest.log("ACTION: resume"); -
trunk/LayoutTests/inspector/debugger/stepping/stepInto-expected.txt
r260113 r260520 43 43 RESUMED 44 44 45 -- Running test case: Debugger.stepInto.function 45 -- Running test case: Debugger.stepInto.functions 46 46 PAUSED (debugger-statement) 47 47 PAUSE AT testFunctions:18:5 … … 152 152 28 } 153 153 29 154 30 function test InnerFunction() {154 30 function testAnonymousFunction() { 155 155 156 156 PAUSE AT testEval:29:2 … … 160 160 -> 28 }| 161 161 29 162 30 function test InnerFunction() {162 30 function testAnonymousFunction() { 163 163 31 (function() { 164 164 165 165 RESUMED 166 166 167 -- Running test case: Debugger.stepInto. innerFunction167 -- Running test case: Debugger.stepInto.anonymousFunction 168 168 PAUSED (debugger-statement) 169 169 PAUSE AT <anonymous>:33:9 170 170 29 171 30 function test InnerFunction() {171 30 function testAnonymousFunction() { 172 172 31 (function() { 173 173 -> 32 |debugger; … … 177 177 178 178 PAUSE AT <anonymous>:34:9 179 30 function test InnerFunction() {179 30 function testAnonymousFunction() { 180 180 31 (function() { 181 181 32 debugger; … … 194 194 37 195 195 196 PAUSE AT test InnerFunction:36:5196 PAUSE AT testAnonymousFunction:36:5 197 197 32 debugger; 198 198 33 let inner = 1; … … 203 203 38 function testCommas() { 204 204 205 PAUSE AT test InnerFunction:37:2205 PAUSE AT testAnonymousFunction:37:2 206 206 33 let inner = 1; 207 207 34 })(); … … 241 241 42 z = 3; 242 242 43 a(), b(), c(); 243 44 true && (a(), b(), c()) ;243 44 true && (a(), b(), c()) && true; 244 244 245 245 PAUSE AT testCommas:43:9 … … 249 249 -> 42 |z = 3; 250 250 43 a(), b(), c(); 251 44 true && (a(), b(), c()) ;251 44 true && (a(), b(), c()) && true; 252 252 45 } 253 253 … … 257 257 42 z = 3; 258 258 -> 43 |a(), b(), c(); 259 44 true && (a(), b(), c()) ;259 44 true && (a(), b(), c()) && true; 260 260 45 } 261 261 46 … … 284 284 42 z = 3; 285 285 -> 43 a(), |b(), c(); 286 44 true && (a(), b(), c()) ;286 44 true && (a(), b(), c()) && true; 287 287 45 } 288 288 46 … … 311 311 42 z = 3; 312 312 -> 43 a(), b(), |c(); 313 44 true && (a(), b(), c()) ;313 44 true && (a(), b(), c()) && true; 314 314 45 } 315 315 46 … … 337 337 42 z = 3; 338 338 43 a(), b(), c(); 339 -> 44 |true && (a(), b(), c()); 340 45 } 341 46 342 47 function testChainedExpressions() { 343 344 PAUSE AT testCommas:45:14 339 -> 44 |true && (a(), b(), c()) && true; 340 45 } 341 46 342 47 function testChainedExpressions() { 343 344 PAUSE AT a:7:16 345 3 <script src="../../../http/tests/inspector/resources/inspector-test.js"></script> 346 4 <script src="../resources/log-pause-location.js"></script> 347 5 <script> 348 -> 6 function a() { |return "a"; } 349 7 function b() { return "b"; } 350 8 function c() { return "c"; } 351 9 352 353 PAUSE AT a:7:29 354 3 <script src="../../../http/tests/inspector/resources/inspector-test.js"></script> 355 4 <script src="../resources/log-pause-location.js"></script> 356 5 <script> 357 -> 6 function a() { return "a"; }| 358 7 function b() { return "b"; } 359 8 function c() { return "c"; } 360 9 361 362 PAUSE AT testCommas:45:19 345 363 41 y = 2, 346 364 42 z = 3; 347 365 43 a(), b(), c(); 348 -> 44 true && ( |a(), b(), c());349 45 } 350 46 351 47 function testChainedExpressions() { 352 353 PAUSE AT a:7:16354 3 <script src="../../../http/tests/inspector/resources/inspector-test.js"></script>355 4 <script src="../resources/log-pause-location.js"></script>356 5 <script>357 -> 6 function a() { |return "a"; }358 7 function b() { return "b"; }359 8 function c() { return "c"; }360 9361 362 PAUSE AT a:7:29363 3 <script src="../../../http/tests/inspector/resources/inspector-test.js"></script>364 4 <script src="../resources/log-pause-location.js"></script>365 5 <script>366 -> 6 function a() { return "a"; }|367 7 function b() { return "b"; }368 8 function c() { return "c"; }369 9370 371 PAUSE AT testCommas:45: 19366 -> 44 true && (a(), |b(), c()) && true; 367 45 } 368 46 369 47 function testChainedExpressions() { 370 371 PAUSE AT b:8:16 372 4 <script src="../resources/log-pause-location.js"></script> 373 5 <script> 374 6 function a() { return "a"; } 375 -> 7 function b() { |return "b"; } 376 8 function c() { return "c"; } 377 9 378 10 function testStatements() { 379 380 PAUSE AT b:8:29 381 4 <script src="../resources/log-pause-location.js"></script> 382 5 <script> 383 6 function a() { return "a"; } 384 -> 7 function b() { return "b"; }| 385 8 function c() { return "c"; } 386 9 387 10 function testStatements() { 388 389 PAUSE AT testCommas:45:24 372 390 41 y = 2, 373 391 42 z = 3; 374 392 43 a(), b(), c(); 375 -> 44 true && (a(), |b(), c()); 376 45 } 377 46 378 47 function testChainedExpressions() { 379 380 PAUSE AT b:8:16 381 4 <script src="../resources/log-pause-location.js"></script> 382 5 <script> 383 6 function a() { return "a"; } 384 -> 7 function b() { |return "b"; } 385 8 function c() { return "c"; } 386 9 387 10 function testStatements() { 388 389 PAUSE AT b:8:29 390 4 <script src="../resources/log-pause-location.js"></script> 391 5 <script> 392 6 function a() { return "a"; } 393 -> 7 function b() { return "b"; }| 394 8 function c() { return "c"; } 395 9 396 10 function testStatements() { 397 398 PAUSE AT testCommas:45:24 399 41 y = 2, 393 -> 44 true && (a(), b(), |c()) && true; 394 45 } 395 46 396 47 function testChainedExpressions() { 397 398 PAUSE AT c:9:16 399 5 <script> 400 6 function a() { return "a"; } 401 7 function b() { return "b"; } 402 -> 8 function c() { |return "c"; } 403 9 404 10 function testStatements() { 405 11 debugger; 406 407 PAUSE AT c:9:29 408 5 <script> 409 6 function a() { return "a"; } 410 7 function b() { return "b"; } 411 -> 8 function c() { return "c"; }| 412 9 413 10 function testStatements() { 414 11 debugger; 415 416 PAUSE AT testCommas:46:2 400 417 42 z = 3; 401 418 43 a(), b(), c(); 402 -> 44 true && (a(), b(), |c()); 403 45 } 404 46 405 47 function testChainedExpressions() { 406 407 PAUSE AT c:9:16 408 5 <script> 409 6 function a() { return "a"; } 410 7 function b() { return "b"; } 411 -> 8 function c() { |return "c"; } 412 9 413 10 function testStatements() { 414 11 debugger; 415 416 PAUSE AT c:9:29 417 5 <script> 418 6 function a() { return "a"; } 419 7 function b() { return "b"; } 420 -> 8 function c() { return "c"; }| 421 9 422 10 function testStatements() { 423 11 debugger; 424 425 PAUSE AT testCommas:46:2 426 42 z = 3; 427 43 a(), b(), c(); 428 44 true && (a(), b(), c()); 419 44 true && (a(), b(), c()) && true; 429 420 -> 45 }| 430 421 46 … … 452 443 50 } 453 444 51 454 52 // ---------445 52 function testDeclarations() { 455 446 456 447 PAUSE AT a:7:16 … … 479 470 50 } 480 471 51 481 52 // ---------472 52 function testDeclarations() { 482 473 483 474 PAUSE AT b:8:16 … … 506 497 50 } 507 498 51 508 52 // ---------499 52 function testDeclarations() { 509 500 510 501 PAUSE AT c:9:16 … … 532 523 -> 50 }| 533 524 51 534 52 // --------- 535 53 536 537 RESUMED 538 525 52 function testDeclarations() { 526 53 debugger; 527 528 RESUMED 529 530 -- Running test case: Debugger.stepInto.declarations 531 PAUSED (debugger-statement) 532 PAUSE AT testDeclarations:54:5 533 50 } 534 51 535 52 function testDeclarations() { 536 -> 53 |debugger; 537 54 let x = a(), 538 55 y = b(), 539 56 z = c(); 540 541 PAUSE AT testDeclarations:55:5 542 51 543 52 function testDeclarations() { 544 53 debugger; 545 -> 54 |let x = a(), 546 55 y = b(), 547 56 z = c(); 548 57 } 549 550 PAUSE AT a:7:16 551 3 <script src="../../../http/tests/inspector/resources/inspector-test.js"></script> 552 4 <script src="../resources/log-pause-location.js"></script> 553 5 <script> 554 -> 6 function a() { |return "a"; } 555 7 function b() { return "b"; } 556 8 function c() { return "c"; } 557 9 558 559 PAUSE AT a:7:29 560 3 <script src="../../../http/tests/inspector/resources/inspector-test.js"></script> 561 4 <script src="../resources/log-pause-location.js"></script> 562 5 <script> 563 -> 6 function a() { return "a"; }| 564 7 function b() { return "b"; } 565 8 function c() { return "c"; } 566 9 567 568 PAUSE AT testDeclarations:56:9 569 52 function testDeclarations() { 570 53 debugger; 571 54 let x = a(), 572 -> 55 |y = b(), 573 56 z = c(); 574 57 } 575 58 576 577 PAUSE AT b:8:16 578 4 <script src="../resources/log-pause-location.js"></script> 579 5 <script> 580 6 function a() { return "a"; } 581 -> 7 function b() { |return "b"; } 582 8 function c() { return "c"; } 583 9 584 10 function testStatements() { 585 586 PAUSE AT b:8:29 587 4 <script src="../resources/log-pause-location.js"></script> 588 5 <script> 589 6 function a() { return "a"; } 590 -> 7 function b() { return "b"; }| 591 8 function c() { return "c"; } 592 9 593 10 function testStatements() { 594 595 PAUSE AT testDeclarations:57:9 596 53 debugger; 597 54 let x = a(), 598 55 y = b(), 599 -> 56 |z = c(); 600 57 } 601 58 602 59 function testInnerFunction() { 603 604 PAUSE AT c:9:16 605 5 <script> 606 6 function a() { return "a"; } 607 7 function b() { return "b"; } 608 -> 8 function c() { |return "c"; } 609 9 610 10 function testStatements() { 611 11 debugger; 612 613 PAUSE AT c:9:29 614 5 <script> 615 6 function a() { return "a"; } 616 7 function b() { return "b"; } 617 -> 8 function c() { return "c"; }| 618 9 619 10 function testStatements() { 620 11 debugger; 621 622 PAUSE AT testDeclarations:58:2 623 54 let x = a(), 624 55 y = b(), 625 56 z = c(); 626 -> 57 }| 627 58 628 59 function testInnerFunction() { 629 60 function alpha() { 630 631 RESUMED 632 633 -- Running test case: Debugger.stepInto.innerFunction 634 PAUSED (debugger-statement) 635 PAUSE AT beta:65:9 636 61 beta(); 637 62 } 638 63 function beta() { 639 -> 64 |debugger; 640 65 } 641 66 alpha(); 642 67 } 643 644 PAUSE AT beta:66:6 645 62 } 646 63 function beta() { 647 64 debugger; 648 -> 65 }| 649 66 alpha(); 650 67 } 651 68 652 653 PAUSE AT alpha:63:6 654 59 function testInnerFunction() { 655 60 function alpha() { 656 61 beta(); 657 -> 62 }| 658 63 function beta() { 659 64 debugger; 660 65 } 661 662 PAUSE AT testInnerFunction:68:2 663 64 debugger; 664 65 } 665 66 alpha(); 666 -> 67 }| 667 68 668 69 // --------- 669 70 670 671 RESUMED 672 -
trunk/LayoutTests/inspector/debugger/stepping/stepInto.html
r260113 r260520 29 29 } 30 30 31 function test InnerFunction() {31 function testAnonymousFunction() { 32 32 (function() { 33 33 debugger; … … 43 43 z = 3; 44 44 a(), b(), c(); 45 true && (a(), b(), c()) ;45 true && (a(), b(), c()) && true; 46 46 } 47 47 … … 49 49 debugger; 50 50 a() && b() && c(); 51 } 52 53 function testDeclarations() { 54 debugger; 55 let x = a(), 56 y = b(), 57 z = c(); 58 } 59 60 function testInnerFunction() { 61 function alpha() { 62 beta(); 63 } 64 function beta() { 65 debugger; 66 } 67 alpha(); 51 68 } 52 69 … … 57 74 let suite = InspectorTest.createAsyncSuite("Debugger.stepInto"); 58 75 59 // Always step-in when call frames change.76 // Always step-into when call frames change. 60 77 WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.CallFramesDidChange, (event) => { 61 78 if (!WI.debuggerManager.activeCallFrame) … … 88 105 89 106 addTestCase({ 90 name: "Debugger.stepInto.function ",107 name: "Debugger.stepInto.functions", 91 108 description: "step-into should step into function calls.", 92 109 expression: "setTimeout(testFunctions)", … … 100 117 101 118 addTestCase({ 102 name: "Debugger.stepInto. innerFunction",119 name: "Debugger.stepInto.anonymousFunction", 103 120 description: "step-into should step out of a function to its caller.", 104 expression: "setTimeout(test InnerFunction)",121 expression: "setTimeout(testAnonymousFunction)", 105 122 }); 106 123 … … 117 134 }); 118 135 136 addTestCase({ 137 name: "Debugger.stepInto.declarations", 138 description: "step-into should step into each declaration.", 139 expression: "setTimeout(testDeclarations)", 140 }); 141 142 addTestCase({ 143 name: "Debugger.stepInto.innerFunction", 144 description: "step-into should step out of a function to its caller.", 145 expression: "setTimeout(testInnerFunction)", 146 }); 147 119 148 loadMainPageContent().then(() => { 120 149 suite.runTestCasesAndFinish(); -
trunk/LayoutTests/inspector/debugger/stepping/stepNext-expected.txt
r260113 r260520 43 43 RESUMED 44 44 45 -- Running test case: Debugger.stepNext.function 45 -- Running test case: Debugger.stepNext.functions 46 46 PAUSED (debugger-statement) 47 47 PAUSE AT testFunctions:18:5 … … 128 128 28 } 129 129 29 130 30 function test InnerFunction() {130 30 function testAnonymousFunction() { 131 131 132 132 PAUSE AT testEval:29:2 … … 136 136 -> 28 }| 137 137 29 138 30 function test InnerFunction() {138 30 function testAnonymousFunction() { 139 139 31 (function() { 140 140 141 141 RESUMED 142 142 143 -- Running test case: Debugger.stepNext. innerFunction143 -- Running test case: Debugger.stepNext.anonymousFunction 144 144 PAUSED (debugger-statement) 145 145 PAUSE AT <anonymous>:33:9 146 146 29 147 30 function test InnerFunction() {147 30 function testAnonymousFunction() { 148 148 31 (function() { 149 149 -> 32 |debugger; … … 153 153 154 154 PAUSE AT <anonymous>:34:9 155 30 function test InnerFunction() {155 30 function testAnonymousFunction() { 156 156 31 (function() { 157 157 32 debugger; … … 170 170 37 171 171 172 PAUSE AT test InnerFunction:36:5172 PAUSE AT testAnonymousFunction:36:5 173 173 32 debugger; 174 174 33 let inner = 1; … … 179 179 38 function testCommas() { 180 180 181 PAUSE AT test InnerFunction:37:2181 PAUSE AT testAnonymousFunction:37:2 182 182 33 let inner = 1; 183 183 34 })(); … … 217 217 42 z = 3; 218 218 43 a(), b(), c(); 219 44 true && (a(), b(), c()) ;219 44 true && (a(), b(), c()) && true; 220 220 221 221 PAUSE AT testCommas:43:9 … … 225 225 -> 42 |z = 3; 226 226 43 a(), b(), c(); 227 44 true && (a(), b(), c()) ;227 44 true && (a(), b(), c()) && true; 228 228 45 } 229 229 … … 233 233 42 z = 3; 234 234 -> 43 |a(), b(), c(); 235 44 true && (a(), b(), c()) ;235 44 true && (a(), b(), c()) && true; 236 236 45 } 237 237 46 … … 242 242 42 z = 3; 243 243 -> 43 a(), |b(), c(); 244 44 true && (a(), b(), c()) ;244 44 true && (a(), b(), c()) && true; 245 245 45 } 246 246 46 … … 251 251 42 z = 3; 252 252 -> 43 a(), b(), |c(); 253 44 true && (a(), b(), c()) ;253 44 true && (a(), b(), c()) && true; 254 254 45 } 255 255 46 … … 259 259 42 z = 3; 260 260 43 a(), b(), c(); 261 -> 44 |true && (a(), b(), c()); 262 45 } 263 46 264 47 function testChainedExpressions() { 265 266 PAUSE AT testCommas:45:14 267 41 y = 2, 268 42 z = 3; 269 43 a(), b(), c(); 270 -> 44 true && (|a(), b(), c()); 261 -> 44 |true && (a(), b(), c()) && true; 271 262 45 } 272 263 46 … … 277 268 42 z = 3; 278 269 43 a(), b(), c(); 279 -> 44 true && (a(), |b(), c()) ;270 -> 44 true && (a(), |b(), c()) && true; 280 271 45 } 281 272 46 … … 286 277 42 z = 3; 287 278 43 a(), b(), c(); 288 -> 44 true && (a(), b(), |c()) ;279 -> 44 true && (a(), b(), |c()) && true; 289 280 45 } 290 281 46 … … 294 285 42 z = 3; 295 286 43 a(), b(), c(); 296 44 true && (a(), b(), c()) ;287 44 true && (a(), b(), c()) && true; 297 288 -> 45 }| 298 289 46 … … 320 311 50 } 321 312 51 322 52 // ---------313 52 function testDeclarations() { 323 314 324 315 PAUSE AT testChainedExpressions:50:12 … … 329 320 50 } 330 321 51 331 52 // ---------322 52 function testDeclarations() { 332 323 333 324 PAUSE AT testChainedExpressions:50:19 … … 338 329 50 } 339 330 51 340 52 // ---------331 52 function testDeclarations() { 341 332 342 333 PAUSE AT testChainedExpressions:51:2 … … 346 337 -> 50 }| 347 338 51 348 52 // --------- 349 53 350 351 RESUMED 352 339 52 function testDeclarations() { 340 53 debugger; 341 342 RESUMED 343 344 -- Running test case: Debugger.stepNext.declarations 345 PAUSED (debugger-statement) 346 PAUSE AT testDeclarations:54:5 347 50 } 348 51 349 52 function testDeclarations() { 350 -> 53 |debugger; 351 54 let x = a(), 352 55 y = b(), 353 56 z = c(); 354 355 PAUSE AT testDeclarations:55:5 356 51 357 52 function testDeclarations() { 358 53 debugger; 359 -> 54 |let x = a(), 360 55 y = b(), 361 56 z = c(); 362 57 } 363 364 PAUSE AT testDeclarations:56:9 365 52 function testDeclarations() { 366 53 debugger; 367 54 let x = a(), 368 -> 55 |y = b(), 369 56 z = c(); 370 57 } 371 58 372 373 PAUSE AT testDeclarations:57:9 374 53 debugger; 375 54 let x = a(), 376 55 y = b(), 377 -> 56 |z = c(); 378 57 } 379 58 380 59 function testInnerFunction() { 381 382 PAUSE AT testDeclarations:58:2 383 54 let x = a(), 384 55 y = b(), 385 56 z = c(); 386 -> 57 }| 387 58 388 59 function testInnerFunction() { 389 60 function alpha() { 390 391 RESUMED 392 393 -- Running test case: Debugger.stepNext.innerFunction 394 PAUSED (debugger-statement) 395 PAUSE AT beta:65:9 396 61 beta(); 397 62 } 398 63 function beta() { 399 -> 64 |debugger; 400 65 } 401 66 alpha(); 402 67 } 403 404 PAUSE AT beta:66:6 405 62 } 406 63 function beta() { 407 64 debugger; 408 -> 65 }| 409 66 alpha(); 410 67 } 411 68 412 413 PAUSE AT alpha:63:6 414 59 function testInnerFunction() { 415 60 function alpha() { 416 61 beta(); 417 -> 62 }| 418 63 function beta() { 419 64 debugger; 420 65 } 421 422 PAUSE AT testInnerFunction:68:2 423 64 debugger; 424 65 } 425 66 alpha(); 426 -> 67 }| 427 68 428 69 // --------- 429 70 430 431 RESUMED 432 -
trunk/LayoutTests/inspector/debugger/stepping/stepNext.html
r260113 r260520 29 29 } 30 30 31 function test InnerFunction() {31 function testAnonymousFunction() { 32 32 (function() { 33 33 debugger; … … 43 43 z = 3; 44 44 a(), b(), c(); 45 true && (a(), b(), c()) ;45 true && (a(), b(), c()) && true; 46 46 } 47 47 … … 49 49 debugger; 50 50 a() && b() && c(); 51 } 52 53 function testDeclarations() { 54 debugger; 55 let x = a(), 56 y = b(), 57 z = c(); 58 } 59 60 function testInnerFunction() { 61 function alpha() { 62 beta(); 63 } 64 function beta() { 65 debugger; 66 } 67 alpha(); 51 68 } 52 69 … … 88 105 89 106 addTestCase({ 90 name: "Debugger.stepNext.function ",107 name: "Debugger.stepNext.functions", 91 108 description: "step-next should step over function calls.", 92 109 expression: "setTimeout(testFunctions)", … … 100 117 101 118 addTestCase({ 102 name: "Debugger.stepNext. innerFunction",119 name: "Debugger.stepNext.anonymousFunction", 103 120 description: "step-next should step out of a function to its caller.", 104 expression: "setTimeout(test InnerFunction)",121 expression: "setTimeout(testAnonymousFunction)", 105 122 }); 106 123 … … 117 134 }); 118 135 136 addTestCase({ 137 name: "Debugger.stepNext.declarations", 138 description: "step-next should step to each declaration.", 139 expression: "setTimeout(testDeclarations)", 140 }); 141 142 addTestCase({ 143 name: "Debugger.stepNext.innerFunction", 144 description: "step-next should step out of a function to its caller.", 145 expression: "setTimeout(testInnerFunction)", 146 }); 147 119 148 loadMainPageContent().then(() => { 120 149 suite.runTestCasesAndFinish(); -
trunk/LayoutTests/inspector/debugger/stepping/stepOut-expected.txt
r260113 r260520 5 5 -- Running test case: Debugger.stepOut.function 6 6 PAUSED (debugger-statement) 7 PAUSE AT testFunction s:12:57 PAUSE AT testFunction:12:5 8 8 8 function c() { return "c"; } 9 9 9 10 10 function testFunction s() {10 10 function testFunction() { 11 11 -> 11 |debugger; 12 12 12 let x = 1; … … 102 102 RESUMED 103 103 104 -- Running test case: Debugger.stepOut.declarations 105 PAUSED (debugger-statement) 106 PAUSE AT testDeclarations:56:5 107 52 } 108 53 109 54 function testDeclarations() { 110 -> 55 |debugger; 111 56 let x = a(), 112 57 y = b(), 113 58 z = c(); 114 115 RESUMED 116 -
trunk/LayoutTests/inspector/debugger/stepping/stepOut.html
r260113 r260520 9 9 function c() { return "c"; } 10 10 11 function testFunction s() {11 function testFunction() { 12 12 debugger; 13 13 let x = 1; … … 45 45 z = 3; 46 46 a(), b(), c(); 47 true && (a(), b(), c()) ;47 true && (a(), b(), c()) && true; 48 48 } 49 49 … … 51 51 debugger; 52 52 a() && b() && c(); 53 } 54 55 function testDeclarations() { 56 debugger; 57 let x = a(), 58 y = b(), 59 z = c(); 53 60 } 54 61 … … 86 93 name: "Debugger.stepOut.function", 87 94 description: "step-out should leave a function.", 88 expression: "setTimeout(testFunction s)",95 expression: "setTimeout(testFunction)", 89 96 }); 90 97 … … 119 126 }); 120 127 128 addTestCase({ 129 name: "Debugger.stepOut.declarations", 130 description: "step-out should leave a function.", 131 expression: "setTimeout(testDeclarations)", 132 }); 133 121 134 loadMainPageContent().then(() => { 122 135 suite.runTestCasesAndFinish(); -
trunk/LayoutTests/inspector/debugger/stepping/stepOver-expected.txt
r260113 r260520 43 43 RESUMED 44 44 45 -- Running test case: Debugger.stepOver.function 45 -- Running test case: Debugger.stepOver.functions 46 46 PAUSED (debugger-statement) 47 47 PAUSE AT testFunctions:18:5 … … 128 128 28 } 129 129 29 130 30 function test InnerFunction() {130 30 function testAnonymousFunction() { 131 131 132 132 PAUSE AT testEval:29:2 … … 136 136 -> 28 }| 137 137 29 138 30 function test InnerFunction() {138 30 function testAnonymousFunction() { 139 139 31 (function() { 140 140 141 141 RESUMED 142 142 143 -- Running test case: Debugger.stepOver. innerFunction143 -- Running test case: Debugger.stepOver.anonymousFunction 144 144 PAUSED (debugger-statement) 145 145 PAUSE AT <anonymous>:33:9 146 146 29 147 30 function test InnerFunction() {147 30 function testAnonymousFunction() { 148 148 31 (function() { 149 149 -> 32 |debugger; … … 153 153 154 154 PAUSE AT <anonymous>:34:9 155 30 function test InnerFunction() {155 30 function testAnonymousFunction() { 156 156 31 (function() { 157 157 32 debugger; … … 170 170 37 171 171 172 PAUSE AT test InnerFunction:36:5172 PAUSE AT testAnonymousFunction:36:5 173 173 32 debugger; 174 174 33 let inner = 1; … … 179 179 38 function testCommas() { 180 180 181 PAUSE AT test InnerFunction:37:2181 PAUSE AT testAnonymousFunction:37:2 182 182 33 let inner = 1; 183 183 34 })(); … … 217 217 42 z = 3; 218 218 43 a(), b(), c(); 219 44 true && (a(), b(), c()) ;219 44 true && (a(), b(), c()) && true; 220 220 221 221 PAUSE AT testCommas:43:9 … … 225 225 -> 42 |z = 3; 226 226 43 a(), b(), c(); 227 44 true && (a(), b(), c()) ;227 44 true && (a(), b(), c()) && true; 228 228 45 } 229 229 … … 233 233 42 z = 3; 234 234 -> 43 |a(), b(), c(); 235 44 true && (a(), b(), c()) ;235 44 true && (a(), b(), c()) && true; 236 236 45 } 237 237 46 … … 242 242 42 z = 3; 243 243 -> 43 a(), |b(), c(); 244 44 true && (a(), b(), c()) ;244 44 true && (a(), b(), c()) && true; 245 245 45 } 246 246 46 … … 251 251 42 z = 3; 252 252 -> 43 a(), b(), |c(); 253 44 true && (a(), b(), c()) ;253 44 true && (a(), b(), c()) && true; 254 254 45 } 255 255 46 … … 259 259 42 z = 3; 260 260 43 a(), b(), c(); 261 -> 44 |true && (a(), b(), c()); 262 45 } 263 46 264 47 function testChainedExpressions() { 265 266 PAUSE AT testCommas:45:14 267 41 y = 2, 268 42 z = 3; 269 43 a(), b(), c(); 270 -> 44 true && (|a(), b(), c()); 271 45 } 272 46 273 47 function testChainedExpressions() { 274 275 PAUSE AT testCommas:45:19 276 41 y = 2, 277 42 z = 3; 278 43 a(), b(), c(); 279 -> 44 true && (a(), |b(), c()); 280 45 } 281 46 282 47 function testChainedExpressions() { 283 284 PAUSE AT testCommas:45:24 285 41 y = 2, 286 42 z = 3; 287 43 a(), b(), c(); 288 -> 44 true && (a(), b(), |c()); 261 -> 44 |true && (a(), b(), c()) && true; 289 262 45 } 290 263 46 … … 294 267 42 z = 3; 295 268 43 a(), b(), c(); 296 44 true && (a(), b(), c()) ;269 44 true && (a(), b(), c()) && true; 297 270 -> 45 }| 298 271 46 … … 320 293 50 } 321 294 51 322 52 // ---------295 52 function testDeclarations() { 323 296 324 297 PAUSE AT testChainedExpressions:51:2 … … 328 301 -> 50 }| 329 302 51 330 52 // --------- 331 53 332 333 RESUMED 334 303 52 function testDeclarations() { 304 53 debugger; 305 306 RESUMED 307 308 -- Running test case: Debugger.stepOver.declarations 309 PAUSED (debugger-statement) 310 PAUSE AT testDeclarations:54:5 311 50 } 312 51 313 52 function testDeclarations() { 314 -> 53 |debugger; 315 54 let x = a(), 316 55 y = b(), 317 56 z = c(); 318 319 PAUSE AT testDeclarations:55:5 320 51 321 52 function testDeclarations() { 322 53 debugger; 323 -> 54 |let x = a(), 324 55 y = b(), 325 56 z = c(); 326 57 } 327 328 PAUSE AT testDeclarations:56:9 329 52 function testDeclarations() { 330 53 debugger; 331 54 let x = a(), 332 -> 55 |y = b(), 333 56 z = c(); 334 57 } 335 58 336 337 PAUSE AT testDeclarations:57:9 338 53 debugger; 339 54 let x = a(), 340 55 y = b(), 341 -> 56 |z = c(); 342 57 } 343 58 344 59 function testInnerFunction() { 345 346 PAUSE AT testDeclarations:58:2 347 54 let x = a(), 348 55 y = b(), 349 56 z = c(); 350 -> 57 }| 351 58 352 59 function testInnerFunction() { 353 60 function alpha() { 354 355 RESUMED 356 357 -- Running test case: Debugger.stepOver.innerFunction 358 PAUSED (debugger-statement) 359 PAUSE AT beta:65:9 360 61 beta(); 361 62 } 362 63 function beta() { 363 -> 64 |debugger; 364 65 } 365 66 alpha(); 366 67 } 367 368 PAUSE AT beta:66:6 369 62 } 370 63 function beta() { 371 64 debugger; 372 -> 65 }| 373 66 alpha(); 374 67 } 375 68 376 377 PAUSE AT alpha:63:6 378 59 function testInnerFunction() { 379 60 function alpha() { 380 61 beta(); 381 -> 62 }| 382 63 function beta() { 383 64 debugger; 384 65 } 385 386 PAUSE AT testInnerFunction:68:2 387 64 debugger; 388 65 } 389 66 alpha(); 390 -> 67 }| 391 68 392 69 // --------- 393 70 394 395 RESUMED 396 -
trunk/LayoutTests/inspector/debugger/stepping/stepOver.html
r260113 r260520 29 29 } 30 30 31 function test InnerFunction() {31 function testAnonymousFunction() { 32 32 (function() { 33 33 debugger; … … 43 43 z = 3; 44 44 a(), b(), c(); 45 true && (a(), b(), c()) ;45 true && (a(), b(), c()) && true; 46 46 } 47 47 … … 49 49 debugger; 50 50 a() && b() && c(); 51 } 52 53 function testDeclarations() { 54 debugger; 55 let x = a(), 56 y = b(), 57 z = c(); 58 } 59 60 function testInnerFunction() { 61 function alpha() { 62 beta(); 63 } 64 function beta() { 65 debugger; 66 } 67 alpha(); 51 68 } 52 69 … … 88 105 89 106 addTestCase({ 90 name: "Debugger.stepOver.function ",107 name: "Debugger.stepOver.functions", 91 108 description: "step-over should step over function calls.", 92 109 expression: "setTimeout(testFunctions)", … … 100 117 101 118 addTestCase({ 102 name: "Debugger.stepOver. innerFunction",119 name: "Debugger.stepOver.anonymousFunction", 103 120 description: "step-over should step out of a function to its caller.", 104 expression: "setTimeout(test InnerFunction)",121 expression: "setTimeout(testAnonymousFunction)", 105 122 }); 106 123 … … 117 134 }); 118 135 136 addTestCase({ 137 name: "Debugger.stepOver.declarations", 138 description: "step-over should step over each declaration.", 139 expression: "setTimeout(testDeclarations)", 140 }); 141 142 addTestCase({ 143 name: "Debugger.stepOver.innerFunction", 144 description: "step-over should step out of a function to its caller.", 145 expression: "setTimeout(testInnerFunction)", 146 }); 147 119 148 loadMainPageContent().then(() => { 120 149 suite.runTestCasesAndFinish(); -
trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow-expected.txt
r259781 r260520 829 829 -- Running test case: Debugger.stepping.IfWithCommas 830 830 EXPRESSION: setTimeout(entryIfWithCommas) 831 STEPS: over, over, over, over, over, resume831 STEPS: over, next, next, next, over, resume 832 832 PAUSED (debugger-statement) 833 833 PAUSE AT entryIfWithCommas:112:5 … … 850 850 115 851 851 852 ACTION: step- over852 ACTION: step-next 853 853 PAUSE AT entryIfWithCommas:113:14 854 854 109 … … 860 860 115 861 861 862 ACTION: step- over862 ACTION: step-next 863 863 PAUSE AT entryIfWithCommas:113:19 864 864 109 … … 870 870 115 871 871 872 ACTION: step- over872 ACTION: step-next 873 873 PAUSE AT entryIfWithCommas:114:9 874 874 110 function entryIfWithCommas() { … … 878 878 114 } 879 879 115 880 116 // ---------880 116 function entryReturnWithCommas() { 881 881 882 882 ACTION: step-over … … 887 887 -> 114 }| 888 888 115 889 116 // --------- 890 117 891 892 ACTION: resume 893 RESUMED 894 PASS: Should have used all steps. 895 889 116 function entryReturnWithCommas() { 890 117 debugger; 891 892 ACTION: resume 893 RESUMED 894 PASS: Should have used all steps. 895 896 -- Running test case: Debugger.stepping.ReturnWithCommas 897 EXPRESSION: setTimeout(entryReturnWithCommas) 898 STEPS: over, next, next, next, over, resume 899 PAUSED (debugger-statement) 900 PAUSE AT entryReturnWithCommas:118:5 901 114 } 902 115 903 116 function entryReturnWithCommas() { 904 -> 117 |debugger; 905 118 return a(), b(), a(); 906 119 } 907 120 908 909 ACTION: step-over 910 PAUSE AT entryReturnWithCommas:119:5 911 115 912 116 function entryReturnWithCommas() { 913 117 debugger; 914 -> 118 |return a(), b(), a(); 915 119 } 916 120 917 121 function entryThrowWithCommas() { 918 919 ACTION: step-next 920 PAUSE AT entryReturnWithCommas:119:12 921 115 922 116 function entryReturnWithCommas() { 923 117 debugger; 924 -> 118 return |a(), b(), a(); 925 119 } 926 120 927 121 function entryThrowWithCommas() { 928 929 ACTION: step-next 930 PAUSE AT entryReturnWithCommas:119:17 931 115 932 116 function entryReturnWithCommas() { 933 117 debugger; 934 -> 118 return a(), |b(), a(); 935 119 } 936 120 937 121 function entryThrowWithCommas() { 938 939 ACTION: step-next 940 PAUSE AT entryReturnWithCommas:119:22 941 115 942 116 function entryReturnWithCommas() { 943 117 debugger; 944 -> 118 return a(), b(), |a(); 945 119 } 946 120 947 121 function entryThrowWithCommas() { 948 949 ACTION: step-over 950 PAUSE AT entryReturnWithCommas:120:2 951 116 function entryReturnWithCommas() { 952 117 debugger; 953 118 return a(), b(), a(); 954 -> 119 }| 955 120 956 121 function entryThrowWithCommas() { 957 122 debugger; 958 959 ACTION: resume 960 RESUMED 961 PASS: Should have used all steps. 962 963 -- Running test case: Debugger.stepping.ThrowWithCommas 964 EXPRESSION: setTimeout(entryThrowWithCommas) 965 STEPS: over, next, next, next, over, resume 966 PAUSED (debugger-statement) 967 PAUSE AT entryThrowWithCommas:123:5 968 119 } 969 120 970 121 function entryThrowWithCommas() { 971 -> 122 |debugger; 972 123 try { 973 124 throw a(), b(), a(); 974 125 } catch { } 975 976 ACTION: step-over 977 PAUSE AT entryThrowWithCommas:125:9 978 121 function entryThrowWithCommas() { 979 122 debugger; 980 123 try { 981 -> 124 |throw a(), b(), a(); 982 125 } catch { } 983 126 } 984 127 985 986 ACTION: step-next 987 PAUSE AT entryThrowWithCommas:125:15 988 121 function entryThrowWithCommas() { 989 122 debugger; 990 123 try { 991 -> 124 throw |a(), b(), a(); 992 125 } catch { } 993 126 } 994 127 995 996 ACTION: step-next 997 PAUSE AT entryThrowWithCommas:125:20 998 121 function entryThrowWithCommas() { 999 122 debugger; 1000 123 try { 1001 -> 124 throw a(), |b(), a(); 1002 125 } catch { } 1003 126 } 1004 127 1005 1006 ACTION: step-next 1007 PAUSE AT entryThrowWithCommas:125:25 1008 121 function entryThrowWithCommas() { 1009 122 debugger; 1010 123 try { 1011 -> 124 throw a(), b(), |a(); 1012 125 } catch { } 1013 126 } 1014 127 1015 1016 ACTION: step-over 1017 PAUSE AT entryThrowWithCommas:127:2 1018 123 try { 1019 124 throw a(), b(), a(); 1020 125 } catch { } 1021 -> 126 }| 1022 127 1023 128 // --------- 1024 129 1025 1026 ACTION: resume 1027 RESUMED 1028 PASS: Should have used all steps. 1029 -
trunk/LayoutTests/inspector/debugger/stepping/stepping-control-flow.html
r259781 r260520 115 115 } 116 116 117 function entryReturnWithCommas() { 118 debugger; 119 return a(), b(), a(); 120 } 121 122 function entryThrowWithCommas() { 123 debugger; 124 try { 125 throw a(), b(), a(); 126 } catch { } 127 } 128 117 129 // --------- 118 130 … … 299 311 steps: [ 300 312 "over", 301 "over", // a() 302 "over", // b() 303 "over", // a() 313 "next", // a() 314 "next", // b() 315 "next", // a() 316 "over", // a() - leaving entry 317 "resume", 318 ] 319 }); 320 321 addSteppingTestCase({ 322 name: "Debugger.stepping.ReturnWithCommas", 323 description: "Should pause before each comma sub-expression.", 324 expression: "setTimeout(entryReturnWithCommas)", 325 steps: [ 326 "over", 327 "next", // a() 328 "next", // b() 329 "next", // a() 330 "over", // a() - leaving entry 331 "resume", 332 ] 333 }); 334 335 addSteppingTestCase({ 336 name: "Debugger.stepping.ThrowWithCommas", 337 description: "Should pause before each comma sub-expression.", 338 expression: "setTimeout(entryThrowWithCommas)", 339 steps: [ 340 "over", 341 "next", // a() 342 "next", // b() 343 "next", // a() 304 344 "over", // a() - leaving entry 305 345 "resume", -
trunk/LayoutTests/inspector/debugger/stepping/stepping-loops-expected.txt
r259781 r260520 848 848 -- Running test case: Debugger.stepping.ForWithCommasStepOver 849 849 EXPRESSION: setTimeout(entryForWithCommas) 850 STEPS: over, over, over, over, over, over, over, over, over, over, over, over, over, over, over, resume850 STEPS: over, next, over, next, over, over, next, over, next, over, over, next, over, next, over, resume 851 851 PAUSED (debugger-statement) 852 852 PAUSE AT entryForWithCommas:78:5 … … 869 869 81 870 870 871 ACTION: step- over871 ACTION: step-next 872 872 PAUSE AT entryForWithCommas:79:21 873 873 75 … … 889 889 81 890 890 891 ACTION: step- over891 ACTION: step-next 892 892 PAUSE AT entryForWithCommas:79:45 893 893 75 … … 919 919 81 920 920 921 ACTION: step- over921 ACTION: step-next 922 922 PAUSE AT entryForWithCommas:79:69 923 923 75 … … 939 939 81 940 940 941 ACTION: step- over941 ACTION: step-next 942 942 PAUSE AT entryForWithCommas:79:45 943 943 75 … … 969 969 81 970 970 971 ACTION: step- over971 ACTION: step-next 972 972 PAUSE AT entryForWithCommas:79:69 973 973 75 … … 989 989 81 990 990 991 ACTION: step- over991 ACTION: step-next 992 992 PAUSE AT entryForWithCommas:79:45 993 993 75 -
trunk/LayoutTests/inspector/debugger/stepping/stepping-loops.html
r259781 r260520 247 247 steps: [ 248 248 "over", 249 " over", // complete: let i = 0249 "next", // complete: let i = 0 250 250 "over", // complete: length = 0 251 " over", // complete: length = 2251 "next", // complete: length = 2 252 252 "over", // complete: i < length 253 253 "over", // complete: a() 254 " over", // complete: length = 1255 "over", // complete: ++i 256 " over", // complete: length = 2254 "next", // complete: length = 1 255 "over", // complete: ++i 256 "next", // complete: length = 2 257 257 "over", // complete: i < length [i=1] 258 258 "over", // complete: a() 259 " over", // complete: length = 1260 "over", // complete: ++i 261 " over", // complete: length = 2259 "next", // complete: length = 1 260 "over", // complete: ++i 261 "next", // complete: length = 2 262 262 "over", // complete: i < length [i=2] - leaving entry 263 263 "resume", -
trunk/LayoutTests/inspector/formatting/resources/javascript-tests/arrow-functions-expected.js
r259810 r260520 60 60 } 61 61 } 62 63 () => { 64 a(), 65 b(), 66 c() 67 } 68 69 () => { 70 return 71 } 72 () => { 73 return 42 74 } 75 () => { 76 return 42, a(), b() 77 } -
trunk/LayoutTests/inspector/formatting/resources/javascript-tests/arrow-functions.js
r248785 r260520 31 31 a=>{for(b of[]);} 32 32 ()=>{try{1}catch{2}} 33 34 ()=>{a(),b(),c()} 35 36 ()=>{return} 37 ()=>{return 42} 38 ()=>{return 42, a(), b()} -
trunk/LayoutTests/inspector/formatting/resources/javascript-tests/functions-expected.js
r209491 r260520 160 160 foo: async function() {} 161 161 } 162 // Commas 163 164 function foo() { 165 a(), 166 b(), 167 c() 168 } 169 170 // Return 171 172 function foo() { 173 return 174 } 175 function foo() { 176 return 42 177 } 178 function foo() { 179 return 42, a(), b() 180 } -
trunk/LayoutTests/inspector/formatting/resources/javascript-tests/functions.js
r209491 r260520 72 72 o={async["foo"](){}} 73 73 o={foo:async function(){}} 74 75 // Commas 76 77 function foo(){a(),b(),c()} 78 79 // Return 80 81 function foo(){return} 82 function foo(){return 42} 83 function foo(){return 42, a(), b()} -
trunk/LayoutTests/inspector/formatting/resources/javascript-tests/try-catch-finally-statements-expected.js
r248760 r260520 85 85 2 86 86 } 87 88 throw a(), b(), c(); -
trunk/LayoutTests/inspector/formatting/resources/javascript-tests/try-catch-finally-statements.js
r248760 r260520 29 29 30 30 try{1}catch(e){1}finally{1}try{2}catch(e){2}finally{2} 31 32 throw a(),b(),c(); -
trunk/Source/JavaScriptCore/ChangeLog
r260517 r260520 1 2020-04-22 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Debugger: Step Over should only step through comma expressions if they are comma statements 4 https://bugs.webkit.org/show_bug.cgi?id=210588 5 6 Reviewed by Brian Burg. 7 8 * parser/Nodes.h: 9 (JSC::ExpressionNode::isStatement const): Added. 10 (JSC::ExpressionNode::setIsStatement): Added. 11 * parser/NodeConstructors.h: 12 (JSC::ExprStatementNode::ExprStatementNode): 13 (JSC::DeclarationStatement::DeclarationStatement): 14 (JSC::ReturnNode::ReturnNode): 15 (JSC::ThrowNode::ThrowNode): 16 * bytecompiler/NodesCodegen.cpp: 17 (JSC::CommaNode::emitBytecode): 18 Only emit `WillExecuteStatement` debug hooks inside `CommaNode` if it's the only child of a 19 statement parent node (e.g. `a(), b(), c()` vs `true && (a(), b(), c()) && true`). 20 21 * parser/Parser.h: 22 * parser/Parser.cpp: 23 (JSC::Parser<LexerType>::parseReturnStatement): 24 (JSC::Parser<LexerType>::parseThrowStatement): 25 (JSC::Parser<LexerType>::parseExpressionOrLabelStatement): 26 (JSC::Parser<LexerType>::parseExpressionStatement): 27 (JSC::Parser<LexerType>::parseExpression): 28 Only record a pause location for each sub-expression in a comma separated expression if it's 29 the only child of a statement (e.g. `a(), b(), c()` vs `true && (a(), b(), c()) && true`). 30 1 31 2020-04-22 Saam Barati <sbarati@apple.com> 2 32 -
trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r260323 r260520 3295 3295 RegisterID* CommaNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst) 3296 3296 { 3297 DebugHookType debugHookType = isOnlyChildOfStatement() ? WillExecuteStatement : WillExecuteExpression; 3298 3297 3299 CommaNode* node = this; 3298 3300 for (; node->next(); node = node->next()) { 3299 generator.emitDebugHook( node->m_expr);3301 generator.emitDebugHook(debugHookType, node->m_expr->position()); 3300 3302 generator.emitNode(generator.ignoredResult(), node->m_expr); 3301 3303 } 3302 generator.emitDebugHook( node->m_expr);3304 generator.emitDebugHook(debugHookType, node->m_expr->position()); 3303 3305 return generator.emitNodeInTailPosition(dst, node->m_expr); 3304 3306 } -
trunk/Source/JavaScriptCore/parser/NodeConstructors.h
r260119 r260520 835 835 , m_expr(expr) 836 836 { 837 m_expr->setIsOnlyChildOfStatement(); 837 838 } 838 839 … … 841 842 , m_expr(expr) 842 843 { 844 m_expr->setIsOnlyChildOfStatement(); 843 845 } 844 846 … … 962 964 , m_value(value) 963 965 { 966 if (m_value) 967 m_value->setIsOnlyChildOfStatement(); 964 968 } 965 969 … … 984 988 , m_expr(expr) 985 989 { 990 m_expr->setIsOnlyChildOfStatement(); 986 991 } 987 992 -
trunk/Source/JavaScriptCore/parser/Nodes.h
r260275 r260520 219 219 ResultType resultDescriptor() const { return m_resultType; } 220 220 221 bool isOnlyChildOfStatement() const { return m_isOnlyChildOfStatement; } 222 void setIsOnlyChildOfStatement() { m_isOnlyChildOfStatement = true; } 223 221 224 bool isOptionalChainBase() const { return m_isOptionalChainBase; } 222 225 void setIsOptionalChainBase() { m_isOptionalChainBase = true; } … … 224 227 private: 225 228 ResultType m_resultType; 229 bool m_isOnlyChildOfStatement { false }; 226 230 bool m_isOptionalChainBase { false }; 227 231 }; -
trunk/Source/JavaScriptCore/parser/Parser.cpp
r260275 r260520 1612 1612 if (autoSemiColon()) 1613 1613 return context.createReturnStatement(location, 0, start, end); 1614 TreeExpression expr = parseExpression(context );1614 TreeExpression expr = parseExpression(context, IsOnlyChildOfStatement::Yes); 1615 1615 failIfFalse(expr, "Cannot parse the return expression"); 1616 1616 end = lastTokenEndPosition(); … … 1632 1632 semanticFailIfTrue(autoSemiColon(), "Cannot have a newline after 'throw'"); 1633 1633 1634 TreeExpression expr = parseExpression(context );1634 TreeExpression expr = parseExpression(context, IsOnlyChildOfStatement::Yes); 1635 1635 failIfFalse(expr, "Cannot parse expression for throw statement"); 1636 1636 JSTextPosition end = lastTokenEndPosition(); … … 3135 3135 // by definition can't make use of continue/break so we can just 3136 3136 // ignore any labels we might have accumulated. 3137 TreeExpression expression = parseExpression(context );3137 TreeExpression expression = parseExpression(context, IsOnlyChildOfStatement::Yes); 3138 3138 failIfFalse(expression, "Cannot parse expression statement"); 3139 3139 if (!autoSemiColon()) … … 3202 3202 JSTextPosition start = tokenStartPosition(); 3203 3203 JSTokenLocation location(tokenLocation()); 3204 TreeExpression expression = parseExpression(context );3204 TreeExpression expression = parseExpression(context, IsOnlyChildOfStatement::Yes); 3205 3205 failIfFalse(expression, "Cannot parse expression statement"); 3206 3206 failIfFalse(autoSemiColon(), "Parse error"); … … 3704 3704 3705 3705 template <typename LexerType> 3706 template <class TreeBuilder> TreeExpression Parser<LexerType>::parseExpression(TreeBuilder& context )3706 template <class TreeBuilder> TreeExpression Parser<LexerType>::parseExpression(TreeBuilder& context, IsOnlyChildOfStatement isStatement) 3707 3707 { 3708 3708 failIfStackOverflow(); … … 3721 3721 context.setEndOffset(right, m_lastTokenEndPosition.offset); 3722 3722 typename TreeBuilder::Comma head = context.createCommaExpr(headLocation, node); 3723 recordPauseLocation(context.breakpointLocation(head)); 3723 if (isStatement == IsOnlyChildOfStatement::Yes) 3724 recordPauseLocation(context.breakpointLocation(head)); 3724 3725 typename TreeBuilder::Comma tail = context.appendToCommaExpr(tailLocation, head, head, right); 3725 recordPauseLocation(context.breakpointLocation(tail)); 3726 if (isStatement == IsOnlyChildOfStatement::Yes) 3727 recordPauseLocation(context.breakpointLocation(tail)); 3726 3728 while (match(COMMA)) { 3727 3729 next(TreeBuilder::DontBuildStrings); … … 3731 3733 context.setEndOffset(right, m_lastTokenEndPosition.offset); 3732 3734 tail = context.appendToCommaExpr(tailLocation, head, tail, right); 3733 recordPauseLocation(context.breakpointLocation(tail)); 3735 if (isStatement == IsOnlyChildOfStatement::Yes) 3736 recordPauseLocation(context.breakpointLocation(tail)); 3734 3737 } 3735 3738 context.setEndOffset(head, m_lastTokenEndPosition.offset); -
trunk/Source/JavaScriptCore/parser/Parser.h
r259131 r260520 1647 1647 template <class TreeBuilder> TreeStatement parseIfStatement(TreeBuilder&); 1648 1648 template <class TreeBuilder> TreeStatement parseBlockStatement(TreeBuilder&, bool isCatchBlock = false); 1649 template <class TreeBuilder> TreeExpression parseExpression(TreeBuilder&); 1649 1650 enum class IsOnlyChildOfStatement { Yes, No }; 1651 template <class TreeBuilder> TreeExpression parseExpression(TreeBuilder&, IsOnlyChildOfStatement = IsOnlyChildOfStatement::No); 1652 1650 1653 template <class TreeBuilder> TreeExpression parseAssignmentExpression(TreeBuilder&, ExpressionErrorClassifier&); 1651 1654 template <class TreeBuilder> TreeExpression parseAssignmentExpression(TreeBuilder&);
Note: See TracChangeset
for help on using the changeset viewer.