Index: src/runtime/runtime-promise.cc |
diff --git a/src/runtime/runtime-promise.cc b/src/runtime/runtime-promise.cc |
index 226993a50ec7d92c3fe753d21531f566476ae148..b528ff7137a91d6620952316c08b730b3aaa747e 100644 |
--- a/src/runtime/runtime-promise.cc |
+++ b/src/runtime/runtime-promise.cc |
@@ -189,5 +189,20 @@ RUNTIME_FUNCTION(Runtime_RunMicrotasks) { |
return isolate->heap()->undefined_value(); |
} |
+RUNTIME_FUNCTION(Runtime_CreateResolvingFunctions) { |
+ HandleScope scope(isolate); |
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
+ Handle<JSFunction> resolve, reject; |
+ |
+ PromiseUtils::CreateResolvingFunctions( |
+ isolate, promise, isolate->factory()->true_value(), &resolve, &reject); |
+ |
+ Handle<FixedArray> result = isolate->factory()->NewFixedArray(2); |
+ result->set(0, *resolve); |
+ result->set(1, *reject); |
+ |
+ return *result; |
+} |
+ |
} // namespace internal |
} // namespace v8 |