| Index: src/promise-utils.cc
|
| diff --git a/src/promise-utils.cc b/src/promise-utils.cc
|
| index 50f6ba16afdecde3c00dab5fd090f50b5d3ba9eb..40b247e8597a26a7b79c918d3032501ba456f018 100644
|
| --- a/src/promise-utils.cc
|
| +++ b/src/promise-utils.cc
|
| @@ -27,42 +27,5 @@ void PromiseUtils::SetAlreadyVisited(Handle<Context> context) {
|
| context->set(kAlreadyVisitedSlot, Smi::FromInt(1));
|
| }
|
|
|
| -void PromiseUtils::CreateResolvingFunctions(Isolate* isolate,
|
| - Handle<JSObject> promise,
|
| - Handle<Object> debug_event,
|
| - Handle<JSFunction>* resolve,
|
| - Handle<JSFunction>* reject) {
|
| - DCHECK(debug_event->IsTrue(isolate) || debug_event->IsFalse(isolate));
|
| - Handle<Context> context =
|
| - 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);
|
| -
|
| - Handle<SharedFunctionInfo> resolve_shared_fun(
|
| - isolate->native_context()->promise_resolve_shared_fun(), isolate);
|
| - Handle<JSFunction> resolve_fun =
|
| - isolate->factory()->NewFunctionFromSharedFunctionInfo(
|
| - isolate->sloppy_function_without_prototype_map(), resolve_shared_fun,
|
| - isolate->native_context(), TENURED);
|
| -
|
| - Handle<SharedFunctionInfo> reject_shared_fun(
|
| - isolate->native_context()->promise_reject_shared_fun(), isolate);
|
| - Handle<JSFunction> reject_fun =
|
| - isolate->factory()->NewFunctionFromSharedFunctionInfo(
|
| - isolate->sloppy_function_without_prototype_map(), reject_shared_fun,
|
| - isolate->native_context(), TENURED);
|
| -
|
| - resolve_fun->set_context(*context);
|
| - reject_fun->set_context(*context);
|
| -
|
| - *resolve = resolve_fun;
|
| - *reject = reject_fun;
|
| -}
|
| -
|
| } // namespace internal
|
| } // namespace v8
|
|
|