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 #include <stdlib.h> | 5 #include <stdlib.h> |
6 #include <sstream> | 6 #include <sstream> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 } | 1092 } |
1093 | 1093 |
1094 | 1094 |
1095 TEST(SubclassPromiseBuiltin) { | 1095 TEST(SubclassPromiseBuiltin) { |
1096 // Avoid eventual completion of in-object slack tracking. | 1096 // Avoid eventual completion of in-object slack tracking. |
1097 FLAG_inline_construct = false; | 1097 FLAG_inline_construct = false; |
1098 FLAG_always_opt = false; | 1098 FLAG_always_opt = false; |
1099 CcTest::InitializeVM(); | 1099 CcTest::InitializeVM(); |
1100 v8::HandleScope scope(CcTest::isolate()); | 1100 v8::HandleScope scope(CcTest::isolate()); |
1101 | 1101 |
1102 const int first_field = 5; | 1102 const int first_field = 6; |
1103 TestSubclassBuiltin("A1", JS_PROMISE_TYPE, "Promise", | 1103 TestSubclassBuiltin("A1", JS_PROMISE_TYPE, "Promise", |
1104 "function(resolve, reject) { resolve('ok'); }", | 1104 "function(resolve, reject) { resolve('ok'); }", |
1105 first_field); | 1105 first_field); |
1106 } | 1106 } |
1107 | 1107 |
1108 | 1108 |
1109 TEST(SubclassPromiseBuiltinNoInlineNew) { | 1109 TEST(SubclassPromiseBuiltinNoInlineNew) { |
1110 FLAG_inline_new = false; | 1110 FLAG_inline_new = false; |
1111 TestSubclassPromiseBuiltin(); | 1111 TestSubclassPromiseBuiltin(); |
1112 } | 1112 } |
OLD | NEW |