d8fe5b9d09
This reverts commit e5e8685c15
.
Bug: v8:9838
Change-Id: I3e45479a2470cb7891b39ac6f7d08404115aa7d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1991954
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Joshua Litt <joshualitt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65692}
27 lines
481 B
JavaScript
27 lines
481 B
JavaScript
// Copyright 2019 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
class MyPromise extends Promise {
|
|
static resolve() {
|
|
return {
|
|
then() {
|
|
throw "then throws";
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|
|
let myIterable = {
|
|
[Symbol.iterator]() {
|
|
return {
|
|
next() {
|
|
return {};
|
|
},
|
|
get return() { return {}; },
|
|
};
|
|
}
|
|
};
|
|
|
|
MyPromise.race(myIterable);
|