Commit a29b658e authored by gsathya's avatar gsathya Committed by Commit bot

[promises] Set promise context's closure to be an empty function

This is similar to how the native context has an empty function set up as it's closure field.

BUG=666984

Review-Url: https://codereview.chromium.org/2528603002
Cr-Commit-Position: refs/heads/master@{#41212}
parent f77dbef1
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment