| OLD | NEW | 
|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 (function (global, binding, v8) { | 5 (function (global, binding, v8) { | 
| 6   'use strict'; | 6   'use strict'; | 
| 7   binding.testExtraShouldReturnFive = function() { | 7   binding.testExtraShouldReturnFive = function() { | 
| 8     return 5; | 8     return 5; | 
| 9   }; | 9   }; | 
| 10 | 10 | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 58 | 58 | 
| 59     const fulfilledPromise2 = Promise_resolve(call(function (arg1, arg2) { | 59     const fulfilledPromise2 = Promise_resolve(call(function (arg1, arg2) { | 
| 60       return (this.prop === arg1 && arg1 === 'value' && arg2) ? 2 : -1; | 60       return (this.prop === arg1 && arg1 === 'value' && arg2) ? 2 : -1; | 
| 61     }, { prop: 'value' }, 'value', arraysOK)); | 61     }, { prop: 'value' }, 'value', arraysOK)); | 
| 62 | 62 | 
| 63     const rejectedPromise = v8.createPromise(); | 63     const rejectedPromise = v8.createPromise(); | 
| 64     v8.rejectPromise(rejectedPromise, apply(function (arg1, arg2) { | 64     v8.rejectPromise(rejectedPromise, apply(function (arg1, arg2) { | 
| 65       return (arg1 === arg2 && arg2 === 'x') ? 3 : -1; | 65       return (arg1 === arg2 && arg2 === 'x') ? 3 : -1; | 
| 66     }, null, new v8.InternalPackedArray('x', 'x'))); | 66     }, null, new v8.InternalPackedArray('x', 'x'))); | 
| 67 | 67 | 
|  | 68     const rejectedButHandledPromise = v8.createPromise(); | 
|  | 69     v8.rejectPromise(rejectedButHandledPromise, 4); | 
|  | 70     v8.markPromiseAsHandled(rejectedButHandledPromise); | 
|  | 71 | 
| 68     return { | 72     return { | 
| 69       privateSymbol: v8.createPrivateSymbol('sym'), | 73       privateSymbol: v8.createPrivateSymbol('sym'), | 
| 70       fulfilledPromise, // should be fulfilled with 1 | 74       fulfilledPromise, // should be fulfilled with 1 | 
| 71       fulfilledPromise2, // should be fulfilled with 2 | 75       fulfilledPromise2, // should be fulfilled with 2 | 
| 72       rejectedPromise // should be rejected with 3 | 76       rejectedPromise, // should be rejected with 3 | 
|  | 77       rejectedButHandledPromise // should be rejected but have a handler | 
| 73     }; | 78     }; | 
| 74   }; | 79   }; | 
| 75 }) | 80 }) | 
| OLD | NEW | 
|---|