Changeset 206105 in webkit
- Timestamp:
- Sep 19, 2016 11:59:22 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206102 r206105 1 2016-09-19 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Scope sidebar shows "Closure" instead of "Local" when paused in anonymous function 4 https://bugs.webkit.org/show_bug.cgi?id=162113 5 <rdar://problem/28348954> 6 7 Reviewed by Brian Burg. 8 9 * inspector/debugger/paused-scopes-expected.txt: 10 * inspector/debugger/paused-scopes.html: 11 * inspector/debugger/resources/paused-scopes.js: 12 Add a third pause to test behavior paused inside an 13 unnamed anonymous function. 14 1 15 2016-09-19 Nan Wang <n_wang@apple.com> 2 16 -
trunk/LayoutTests/inspector/debugger/paused-scopes-expected.txt
r202717 r206105 3 3 4 4 == Running test suite: PausedCallFrameScope 5 -- Running test case: TriggerFirstPause5 -- Running test case: PausedCallFrameScope.TriggerFirstPause 6 6 CALLFRAME: firstPause 7 7 … … 93 93 94 94 95 -- Running test case: TriggerSecondPause95 -- Running test case: PausedCallFrameScope.TriggerSecondPause 96 96 CALLFRAME: secondPause 97 97 … … 204 204 205 205 206 -- Running test case: PausedCallFrameScope.TriggerThirdPause 207 CALLFRAME: 208 209 ---- Scope Chain ---- 210 SCOPE: Name () - Type (Closure) - Hash (:<sourceID>:36:14) 211 - localVariableInsideAnonymousFunction 212 SCOPE: Name () - Type (Closure) - Hash (:<sourceID>:36:14) 213 SCOPE: Name (thirdPause) - Type (Closure) - Hash (thirdPause:<sourceID>:34:20) 214 - closureVariableInsideThirdPause 215 SCOPE: Name (thirdPause) - Type (Closure) - Hash (thirdPause:<sourceID>:34:20) 216 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 217 - globalLet2 218 SCOPE: Name () - Type (Global) - Hash () 219 220 ---- Merged Scope Chain ---- 221 SCOPE: Name () - Type (Local) - Hash (:<sourceID>:36:14) 222 - localVariableInsideAnonymousFunction 223 SCOPE: Name (thirdPause) - Type (Closure) - Hash (thirdPause:<sourceID>:34:20) 224 - closureVariableInsideThirdPause 225 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 226 - globalLet2 227 SCOPE: Name () - Type (Global) - Hash () 228 229 CALLFRAME: thirdPause 230 231 ---- Scope Chain ---- 232 SCOPE: Name (thirdPause) - Type (Closure) - Hash (thirdPause:<sourceID>:34:20) 233 - closureVariableInsideThirdPause 234 SCOPE: Name (thirdPause) - Type (Closure) - Hash (thirdPause:<sourceID>:34:20) 235 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 236 - globalLet2 237 SCOPE: Name () - Type (Global) - Hash () 238 239 ---- Merged Scope Chain ---- 240 SCOPE: Name (thirdPause) - Type (Local) - Hash (thirdPause:<sourceID>:34:20) 241 - closureVariableInsideThirdPause 242 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 243 - globalLet2 244 SCOPE: Name () - Type (Global) - Hash () 245 246 CALLFRAME: firstPause 247 248 ---- Scope Chain ---- 249 SCOPE: Name (firstPause) - Type (Block) - Hash (firstPause:<sourceID>:21:29) 250 - barLexicalVariable2 251 SCOPE: Name (firstPause) - Type (Closure) - Hash (firstPause:<sourceID>:21:29) 252 - barLexicalVariable2 253 SCOPE: Name (firstPause) - Type (Closure) - Hash (firstPause:<sourceID>:21:29) 254 - barVarVariable1 255 SCOPE: Name (firstPause) - Type (FunctionName) - Hash (firstPause:<sourceID>:21:29) 256 - firstPause 257 SCOPE: Name (firstPause) - Type (Closure) - Hash (firstPause:<sourceID>:19:24) 258 - fakeFirstPauseLexicalVariable 259 SCOPE: Name (firstPause) - Type (Closure) - Hash (firstPause:<sourceID>:19:24) 260 SCOPE: Name (entry) - Type (Closure) - Hash (entry:<sourceID>:14:15) 261 - fooLexicalVariable2 262 SCOPE: Name (entry) - Type (Closure) - Hash (entry:<sourceID>:14:15) 263 - firstPause 264 - fooVarVariable1 265 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 266 - globalLet2 267 SCOPE: Name () - Type (Global) - Hash () 268 269 ---- Merged Scope Chain ---- 270 SCOPE: Name (firstPause) - Type (Block) - Hash (firstPause:<sourceID>:21:29) 271 - barLexicalVariable2 272 SCOPE: Name (firstPause) - Type (Local) - Hash (firstPause:<sourceID>:21:29) 273 - barVarVariable1 274 - barLexicalVariable2 275 SCOPE: Name (firstPause) - Type (FunctionName) - Hash (firstPause:<sourceID>:21:29) 276 - firstPause 277 SCOPE: Name (firstPause) - Type (Closure) - Hash (firstPause:<sourceID>:19:24) 278 - fakeFirstPauseLexicalVariable 279 SCOPE: Name (entry) - Type (Closure) - Hash (entry:<sourceID>:14:15) 280 - firstPause 281 - fooVarVariable1 282 - fooLexicalVariable2 283 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 284 - globalLet2 285 SCOPE: Name () - Type (Global) - Hash () 286 287 CALLFRAME: firstPause 288 289 ---- Scope Chain ---- 290 SCOPE: Name (firstPause) - Type (Closure) - Hash (firstPause:<sourceID>:19:24) 291 - fakeFirstPauseLexicalVariable 292 SCOPE: Name (firstPause) - Type (Closure) - Hash (firstPause:<sourceID>:19:24) 293 SCOPE: Name (entry) - Type (Closure) - Hash (entry:<sourceID>:14:15) 294 - fooLexicalVariable2 295 SCOPE: Name (entry) - Type (Closure) - Hash (entry:<sourceID>:14:15) 296 - firstPause 297 - fooVarVariable1 298 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 299 - globalLet2 300 SCOPE: Name () - Type (Global) - Hash () 301 302 ---- Merged Scope Chain ---- 303 SCOPE: Name (firstPause) - Type (Local) - Hash (firstPause:<sourceID>:19:24) 304 - fakeFirstPauseLexicalVariable 305 SCOPE: Name (entry) - Type (Closure) - Hash (entry:<sourceID>:14:15) 306 - firstPause 307 - fooVarVariable1 308 - fooLexicalVariable2 309 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 310 - globalLet2 311 SCOPE: Name () - Type (Global) - Hash () 312 313 CALLFRAME: entry 314 315 ---- Scope Chain ---- 316 SCOPE: Name (entry) - Type (Closure) - Hash (entry:<sourceID>:14:15) 317 - fooLexicalVariable2 318 SCOPE: Name (entry) - Type (Closure) - Hash (entry:<sourceID>:14:15) 319 - firstPause 320 - fooVarVariable1 321 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 322 - globalLet2 323 SCOPE: Name () - Type (Global) - Hash () 324 325 ---- Merged Scope Chain ---- 326 SCOPE: Name (entry) - Type (Local) - Hash (entry:<sourceID>:14:15) 327 - firstPause 328 - fooVarVariable1 329 - fooLexicalVariable2 330 SCOPE: Name () - Type (GlobalLexicalEnvironment) - Hash () 331 - globalLet2 332 SCOPE: Name () - Type (Global) - Hash () 333 334 -
trunk/LayoutTests/inspector/debugger/paused-scopes.html
r206063 r206105 84 84 85 85 suite.addTestCase({ 86 name: " TriggerFirstPause",87 description: " VerifyCallFrames and Scopes with the first pause.",86 name: "PausedCallFrameScope.TriggerFirstPause", 87 description: "Dump CallFrames and Scopes with the first pause.", 88 88 test: (resolve, reject) => { 89 89 InspectorTest.evaluateInPage("setTimeout(entry)"); … … 95 95 96 96 suite.addTestCase({ 97 name: "TriggerSecondPause", 98 description: "Verify CallFrames and Scopes with the first pause.", 97 name: "PausedCallFrameScope.TriggerSecondPause", 98 description: "Dump CallFrames and Scopes with the second pause.", 99 test: (resolve, reject) => { 100 WebInspector.debuggerManager.resume(); 101 WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.CallFramesDidChange, (event) => { 102 dumpCallFrames().then(() => { 103 WebInspector.debuggerManager.resume(); 104 resolve(); 105 }, reject); 106 }); 107 } 108 }); 109 110 suite.addTestCase({ 111 name: "PausedCallFrameScope.TriggerThirdPause", 112 description: "Dump CallFrames and Scopes with the third pause.", 99 113 test: (resolve, reject) => { 100 114 WebInspector.debuggerManager.resume(); -
trunk/LayoutTests/inspector/debugger/resources/paused-scopes.js
r202717 r206105 26 26 debugger; 27 27 secondPause(); 28 thirdPause(); 28 29 } 29 30 })(); 30 31 } 31 32 } 33 34 function thirdPause() { 35 let closureVariableInsideThirdPause = false; 36 (function() { 37 let localVariableInsideAnonymousFunction = true; 38 debugger; 39 })(); 40 } -
trunk/Source/WebInspectorUI/ChangeLog
r206101 r206105 1 2016-09-19 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Scope sidebar shows "Closure" instead of "Local" when paused in anonymous function 4 https://bugs.webkit.org/show_bug.cgi?id=162113 5 <rdar://problem/28348954> 6 7 Reviewed by Brian Burg. 8 9 * UserInterface/Models/CallFrame.js: 10 (WebInspector.CallFrame): 11 Default the functionName to the empty string. This will compare 12 favorably against other empty function names instead of null. 13 1 14 2016-09-19 Matt Baker <mattbaker@apple.com> 2 15 -
trunk/Source/WebInspectorUI/UserInterface/Models/CallFrame.js
r202717 r206105 36 36 this._id = id || null; 37 37 this._sourceCodeLocation = sourceCodeLocation || null; 38 this._functionName = functionName || null;38 this._functionName = functionName || ""; 39 39 this._thisObject = thisObject || null; 40 40 this._scopeChain = scopeChain || [];
Note: See TracChangeset
for help on using the changeset viewer.