OLD | NEW |
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 // Flags: --harmony-async-await | 5 // Flags: --harmony-async-await |
6 // Flags: --expose-debug-as debug --allow-natives-syntax --ignition-generators | 6 // Flags: --expose-debug-as debug --allow-natives-syntax |
7 | 7 |
8 var Debug = debug.Debug; | 8 var Debug = debug.Debug; |
9 var LiveEdit = Debug.LiveEdit; | 9 var LiveEdit = Debug.LiveEdit; |
10 | 10 |
11 unique_id = 0; | 11 unique_id = 0; |
12 | 12 |
13 var AsyncFunction = (async function(){}).constructor; | 13 var AsyncFunction = (async function(){}).constructor; |
14 | 14 |
15 function assertPromiseValue(value, promise) { | 15 function assertPromiseValue(value, promise) { |
16 promise.then(resolve => { | 16 promise.then(resolve => { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 promise = asyncfn(function() { return fun_inside(attempt_fun_patches) }); | 124 promise = asyncfn(function() { return fun_inside(attempt_fun_patches) }); |
125 assertEquals('Cat', | 125 assertEquals('Cat', |
126 fun_outside(function () { | 126 fun_outside(function () { |
127 assertPromiseValue('Capybara', promise); | 127 assertPromiseValue('Capybara', promise); |
128 assertTrue(fun_patch_restarted); | 128 assertTrue(fun_patch_restarted); |
129 assertTrue(fun_inside.toString().includes("'Koala'")); | 129 assertTrue(fun_inside.toString().includes("'Koala'")); |
130 })); | 130 })); |
131 })(); | 131 })(); |
132 | 132 |
133 %RunMicrotasks(); | 133 %RunMicrotasks(); |
OLD | NEW |