| Index: src/runtime/runtime-function.cc
|
| diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
|
| index fa509419257045d15fa83af562258cd30182fc1f..be958764a4566772dbf5e3f3e241fc60d6885cf5 100644
|
| --- a/src/runtime/runtime-function.cc
|
| +++ b/src/runtime/runtime-function.cc
|
| @@ -292,5 +292,16 @@ RUNTIME_FUNCTION(Runtime_FunctionToString) {
|
| : *JSFunction::ToString(Handle<JSFunction>::cast(function));
|
| }
|
|
|
| +RUNTIME_FUNCTION(Runtime_FunctionIsAsyncFunction) {
|
| + SealHandleScope shs(isolate);
|
| + DCHECK_EQ(1, args.length());
|
| + CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
|
| + bool is_async = false;
|
| + if (function->IsFunction()) {
|
| + is_async = Handle<JSFunction>::cast(function)->shared()->is_async();
|
| + }
|
| + return isolate->heap()->ToBoolean(is_async);
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace v8
|
|
|