Index: src/promise-utils.cc |
diff --git a/src/promise-utils.cc b/src/promise-utils.cc |
index fa5213463b6f4709f181578797af279ba6702d73..607dbe8caa38f658c5edf5b12557bf39e1be325d 100644 |
--- a/src/promise-utils.cc |
+++ b/src/promise-utils.cc |
@@ -44,6 +44,8 @@ void PromiseUtils::CreateResolvingFunctions(Isolate* isolate, |
isolate->factory()->NewPromiseResolvingFunctionContext( |
kPromiseContextLength); |
context->set_native_context(*isolate->native_context()); |
+ // We set the closure to be an empty function, same as native context. |
+ context->set_closure(isolate->native_context()->closure()); |
context->set(kAlreadyVisitedSlot, Smi::kZero); |
context->set(kPromiseSlot, *promise); |
context->set(kDebugEventSlot, *debug_event); |