| 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 "src/base/utils/random-number-generator.h" | 5 #include "src/base/utils/random-number-generator.h" |
| 6 #include "src/builtins/builtins-promise.h" | 6 #include "src/builtins/builtins-promise.h" |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stub-assembler.h" | 8 #include "src/code-stub-assembler.h" |
| 9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
| 10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
| (...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1889 CHECK(result->IsPromiseReactionJobInfo()); | 1889 CHECK(result->IsPromiseReactionJobInfo()); |
| 1890 Handle<PromiseReactionJobInfo> promise_info = | 1890 Handle<PromiseReactionJobInfo> promise_info = |
| 1891 Handle<PromiseReactionJobInfo>::cast(result); | 1891 Handle<PromiseReactionJobInfo>::cast(result); |
| 1892 CHECK_EQ(Smi::FromInt(1), promise_info->value()); | 1892 CHECK_EQ(Smi::FromInt(1), promise_info->value()); |
| 1893 CHECK(promise_info->promise()->IsJSPromise()); | 1893 CHECK(promise_info->promise()->IsJSPromise()); |
| 1894 CHECK(promise_info->tasks()->IsFixedArray()); | 1894 CHECK(promise_info->tasks()->IsFixedArray()); |
| 1895 CHECK(promise_info->deferred_promise()->IsFixedArray()); | 1895 CHECK(promise_info->deferred_promise()->IsFixedArray()); |
| 1896 CHECK(promise_info->deferred_on_resolve()->IsUndefined(isolate)); | 1896 CHECK(promise_info->deferred_on_resolve()->IsUndefined(isolate)); |
| 1897 CHECK(promise_info->deferred_on_reject()->IsUndefined(isolate)); | 1897 CHECK(promise_info->deferred_on_reject()->IsUndefined(isolate)); |
| 1898 CHECK(promise_info->context()->IsContext()); | 1898 CHECK(promise_info->context()->IsContext()); |
| 1899 CHECK(promise_info->debug_id()->IsUndefined(isolate)); | 1899 CHECK_EQ(kDebugPromiseNoID, promise_info->debug_id()); |
| 1900 CHECK(promise_info->debug_name()->IsUndefined(isolate)); | 1900 CHECK_EQ(kDebugNotActive, promise_info->debug_name()); |
| 1901 } | 1901 } |
| 1902 | 1902 |
| 1903 TEST(IsSymbol) { | 1903 TEST(IsSymbol) { |
| 1904 Isolate* isolate(CcTest::InitIsolateOnce()); | 1904 Isolate* isolate(CcTest::InitIsolateOnce()); |
| 1905 | 1905 |
| 1906 const int kNumParams = 1; | 1906 const int kNumParams = 1; |
| 1907 CodeAssemblerTester data(isolate, kNumParams); | 1907 CodeAssemblerTester data(isolate, kNumParams); |
| 1908 CodeStubAssembler m(data.state()); | 1908 CodeStubAssembler m(data.state()); |
| 1909 | 1909 |
| 1910 Node* const symbol = m.Parameter(0); | 1910 Node* const symbol = m.Parameter(0); |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2214 .ToHandleChecked(); | 2214 .ToHandleChecked(); |
| 2215 Handle<Object> prop2 = | 2215 Handle<Object> prop2 = |
| 2216 JSReceiver::GetProperty(isolate, promise, "rejectedReason") | 2216 JSReceiver::GetProperty(isolate, promise, "rejectedReason") |
| 2217 .ToHandleChecked(); | 2217 .ToHandleChecked(); |
| 2218 CHECK_EQ(*rejected_str, *prop2); | 2218 CHECK_EQ(*rejected_str, *prop2); |
| 2219 } | 2219 } |
| 2220 } | 2220 } |
| 2221 | 2221 |
| 2222 } // namespace internal | 2222 } // namespace internal |
| 2223 } // namespace v8 | 2223 } // namespace v8 |
| OLD | NEW |