Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: test/cctest/test-code-stub-assembler.cc

Issue 2581503003: [promisehook] Store promise in PromiseReactionJob (Closed)
Patch Set: rebase correctly Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/builtins/builtins-promise.cc ('K') | « src/runtime/runtime-promise.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-code-stub-assembler.cc
diff --git a/test/cctest/test-code-stub-assembler.cc b/test/cctest/test-code-stub-assembler.cc
index ec1308a72c7767a73f24d1ccf7f76b63f8ab4a1a..d91139b740ab78b5514e94d5cb24d0669dec8594 100644
--- a/test/cctest/test-code-stub-assembler.cc
+++ b/test/cctest/test-code-stub-assembler.cc
@@ -1897,13 +1897,14 @@ TEST(AllocatePromiseReactionJobInfo) {
CodeStubAssembler m(data.state());
Node* const context = m.Parameter(kNumParams + 2);
+ Node* const promise = m.AllocateJSPromise(context);
Node* const tasks = m.AllocateFixedArray(FAST_ELEMENTS, m.IntPtrConstant(1));
m.StoreFixedArrayElement(tasks, 0, m.UndefinedConstant());
Node* const deferred =
m.AllocateFixedArray(FAST_ELEMENTS, m.IntPtrConstant(1));
m.StoreFixedArrayElement(deferred, 0, m.UndefinedConstant());
- Node* const info = m.AllocatePromiseReactionJobInfo(m.SmiConstant(1), tasks,
- deferred, context);
+ Node* const info = m.AllocatePromiseReactionJobInfo(m.SmiConstant(1), promise,
+ tasks, deferred, context);
m.Return(info);
Handle<Code> code = data.GenerateCode();
@@ -1916,6 +1917,7 @@ TEST(AllocatePromiseReactionJobInfo) {
Handle<PromiseReactionJobInfo> promise_info =
Handle<PromiseReactionJobInfo>::cast(result);
CHECK_EQ(Smi::FromInt(1), promise_info->value());
+ CHECK(promise_info->promise()->IsJSPromise());
CHECK(promise_info->tasks()->IsFixedArray());
CHECK(promise_info->deferred()->IsFixedArray());
CHECK(promise_info->context()->IsContext());
« src/builtins/builtins-promise.cc ('K') | « src/runtime/runtime-promise.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698