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

Side by Side Diff: test/mjsunit/regress/regress-5164.js

Issue 2122923003: [debugger] Don't leak holes from generator arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: DCHECK Created 4 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 unified diff | Download patch
« no previous file with comments | « src/accessors.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
(Empty)
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
3 // found in the LICENSE file.
4 //
5 // Flags: --expose-debug-as debug
6
7 var failure = null;
8 var args;
9
10 function listener(event, exec_state, event_data, data) {
11 if (event != debug.Debug.DebugEvent.Break) return;
12 try {
13 args = exec_state.frame(0).evaluate('arguments').value();
14 } catch (e) {
15 failure = e;
16 }
17 }
18
19 debug.Debug.setListener(listener);
20
21 function* gen(a, b) {
22 debugger;
23 yield a;
24 yield b;
25 }
26
27 var foo = gen(1, 2);
28
29 foo.next()
30 assertEquals(2, args.length);
31 assertEquals(undefined, args[0]);
32 assertEquals(undefined, args[1]);
33
34 foo.next()
35 assertEquals(2, args.length);
36 assertEquals(undefined, args[0]);
37 assertEquals(undefined, args[1]);
38
39 foo.next()
40 assertEquals(2, args.length);
41 assertEquals(undefined, args[0]);
42 assertEquals(undefined, args[1]);
43
44 assertNull(failure);
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698