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

Side by Side Diff: test/inspector/debugger/suspended-generator-scopes.js

Issue 2785523004: [inspector] fixed suspended-generator-scopes.js with --aways-opt (Closed)
Patch Set: rebased Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/inspector/inspector.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 InspectorTest.addScript( 5 InspectorTest.addScript(
6 `function *gen(a) { 6 `function *gen(a) {
7 var b = 42; 7 var b = 42;
8 yield a; 8 yield a;
9 return b; 9 return b;
10 } 10 }
11 function testSuspendedGenerator() 11 function testSuspendedGenerator()
12 { 12 {
13 var g = gen(420); 13 var g = gen(420);
14 g.next(); 14 g.next();
15 15
16 debugger; 16 debugger;
17 return g;
17 }`); 18 }`);
18 19
19 Protocol.Debugger.enable().then(testSuite); 20 Protocol.Debugger.enable().then(testSuite);
20 21
21 function dumpInnermostScope(msg) { 22 function dumpInnermostScope(msg) {
22 var scopes = msg.result.result; 23 var scopes = msg.result.result;
23 var inner_scope = scopes[0].value; 24 var inner_scope = scopes[0].value;
24 return Protocol.Runtime.getProperties({ objectId : inner_scope.objectId }) 25 return Protocol.Runtime.getProperties({ objectId : inner_scope.objectId })
25 .then(InspectorTest.logMessage); 26 .then(InspectorTest.logMessage);
26 } 27 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 }, 70 },
70 71
71 function testScopesNonPaused(next) { 72 function testScopesNonPaused(next) {
72 Protocol.Runtime.evaluate({ expression : "gen(430)"}) 73 Protocol.Runtime.evaluate({ expression : "gen(430)"})
73 .then(msg => fetchGeneratorProperties(msg.result.result.objectId)) 74 .then(msg => fetchGeneratorProperties(msg.result.result.objectId))
74 .then(dumpGeneratorScopes) 75 .then(dumpGeneratorScopes)
75 .then(next); 76 .then(next);
76 }, 77 },
77 ]); 78 ]);
78 } 79 }
OLDNEW
« no previous file with comments | « no previous file | test/inspector/inspector.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698