| 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 | |
| 7 | 6 |
| 8 var Debug = debug.Debug; | 7 var Debug = debug.Debug; |
| 9 var LiveEdit = Debug.LiveEdit; | 8 var LiveEdit = Debug.LiveEdit; |
| 10 | 9 |
| 11 unique_id = 0; | 10 unique_id = 0; |
| 12 | 11 |
| 13 var AsyncFunction = (async function(){}).constructor; | 12 var AsyncFunction = (async function(){}).constructor; |
| 14 | 13 |
| 15 function assertPromiseValue(value, promise) { | 14 function assertPromiseValue(value, promise) { |
| 16 promise.then(resolve => { | 15 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) }); | 123 promise = asyncfn(function() { return fun_inside(attempt_fun_patches) }); |
| 125 assertEquals('Cat', | 124 assertEquals('Cat', |
| 126 fun_outside(function () { | 125 fun_outside(function () { |
| 127 assertPromiseValue('Capybara', promise); | 126 assertPromiseValue('Capybara', promise); |
| 128 assertTrue(fun_patch_restarted); | 127 assertTrue(fun_patch_restarted); |
| 129 assertTrue(fun_inside.toString().includes("'Koala'")); | 128 assertTrue(fun_inside.toString().includes("'Koala'")); |
| 130 })); | 129 })); |
| 131 })(); | 130 })(); |
| 132 | 131 |
| 133 %RunMicrotasks(); | 132 %RunMicrotasks(); |
| OLD | NEW |