Skip to content

Commit efe28b8

Browse files
ofrobotsrvagg
authored andcommitted
deps: V8: fix bug in InternalPerformPromiseThen
This fix never landed upstream as it was not longer relevant to active V8 branches for Chromium. Original commit message: [turbofan] Fix bug in InternalPerformPromiseThen Bug: chromium:831170 Change-Id: I1022fc360aafdfd392d6781eb50afc87a18096fd PR-URL: #21426 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 9aeffab commit efe28b8

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

‎deps/v8/include/v8-version.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#defineV8_MAJOR_VERSION 6
1212
#defineV8_MINOR_VERSION 2
1313
#defineV8_BUILD_NUMBER 414
14-
#defineV8_PATCH_LEVEL59
14+
#defineV8_PATCH_LEVEL60
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

‎deps/v8/src/builtins/builtins-promise-gen.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ Node* PromiseBuiltinsAssembler::InternalPerformPromiseThen(
509509
BIND(&if_existingcallbacks);
510510
{
511511
Label if_singlecallback(this), if_multiplecallbacks(this);
512-
BranchIfJSObject(existing_deferred_promise, &if_singlecallback,
513-
&if_multiplecallbacks);
512+
Branch(HasInstanceType(existing_deferred_promise, FIXED_ARRAY_TYPE),
513+
&if_multiplecallbacks, &if_singlecallback);
514514

515515
BIND(&if_singlecallback);
516516
{
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2018 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+
classMyPromiseextendsPromise{
6+
staticget[Symbol.species](){
7+
returnfunction(f){
8+
console.log("foo")
9+
vara=newPromise(f);
10+
returnnewProxy(newFunction(),{})
11+
}
12+
}
13+
}
14+
varp1=newPromise(function(resolve,reject){});
15+
p1.__proto__=MyPromise.prototype;
16+
p1.then();
17+
p1.then();
18+
19+
for(vari=0;i<0x20000;i++){
20+
newString()
21+
}

0 commit comments

Comments
 (0)