@@ -230,7 +230,7 @@ Node* PromiseBuiltinsAssembler::InternalPerformPromiseThen(Node* context,
230230 {
231231 Label fulfilled_check (this );
232232 Node* const status = LoadObjectField (promise, JSPromise::kStatusOffset );
233- GotoUnless (SmiEqual (status, SmiConstant (kPromisePending )),
233+ GotoUnless (SmiEqual (status, SmiConstant (v8::Promise:: kPending )),
234234 &fulfilled_check);
235235
236236 Node* const existing_deferred =
@@ -304,12 +304,13 @@ Node* PromiseBuiltinsAssembler::InternalPerformPromiseThen(Node* context,
304304 {
305305 Label reject (this );
306306 Node* const result = LoadObjectField (promise, JSPromise::kResultOffset );
307- GotoUnless (WordEqual (status, SmiConstant (kPromiseFulfilled )), &reject);
307+ GotoUnless (WordEqual (status, SmiConstant (v8::Promise::kFulfilled )),
308+ &reject);
308309
309310 // TODO(gsathya): Move this to TF.
310311 CallRuntime (Runtime::kEnqueuePromiseReactionJob , context, promise, result,
311312 var_on_resolve.value (), deferred,
312- SmiConstant (kPromiseFulfilled ));
313+ SmiConstant (v8::Promise:: kFulfilled ));
313314 Goto (&out);
314315
315316 Bind (&reject);
@@ -326,7 +327,7 @@ Node* PromiseBuiltinsAssembler::InternalPerformPromiseThen(Node* context,
326327 {
327328 CallRuntime (Runtime::kEnqueuePromiseReactionJob , context, promise,
328329 result, var_on_reject.value (), deferred,
329- SmiConstant (kPromiseRejected ));
330+ SmiConstant (v8::Promise:: kRejected ));
330331
331332 Goto (&out);
332333 }
@@ -415,7 +416,7 @@ void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context,
415416 LoadObjectField (result, JSPromise::kResultOffset );
416417
417418 Label if_isnotpending (this );
418- GotoUnless (SmiEqual (SmiConstant (kPromisePending ), thenable_status),
419+ GotoUnless (SmiEqual (SmiConstant (v8::Promise:: kPending ), thenable_status),
419420 &if_isnotpending);
420421
421422 // TODO(gsathya): Use a marker here instead of the actual then
@@ -430,13 +431,13 @@ void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context,
430431 Bind (&if_isnotpending);
431432 {
432433 Label if_fulfilled (this ), if_rejected (this );
433- Branch (SmiEqual (SmiConstant (kPromiseFulfilled ), thenable_status),
434+ Branch (SmiEqual (SmiConstant (v8::Promise:: kFulfilled ), thenable_status),
434435 &if_fulfilled, &if_rejected);
435436
436437 Bind (&if_fulfilled);
437438 {
438439 CallRuntime (Runtime::kPromiseFulfill , context, promise,
439- SmiConstant (kPromiseFulfilled ), thenable_value);
440+ SmiConstant (v8::Promise:: kFulfilled ), thenable_value);
440441 PromiseSetHasHandler (promise);
441442 Goto (out);
442443 }
@@ -507,7 +508,7 @@ void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context,
507508 Bind (&fulfill);
508509 {
509510 CallRuntime (Runtime::kPromiseFulfill , context, promise,
510- SmiConstant (kPromiseFulfilled ), result);
511+ SmiConstant (v8::Promise:: kFulfilled ), result);
511512 Goto (out);
512513 }
513514
0 commit comments