V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
builtins-promise.cc
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/builtins/builtins-utils-inl.h"
6 #include "src/builtins/builtins.h"
7 #include "src/counters.h"
8 #include "src/objects-inl.h"
9 
10 namespace v8 {
11 namespace internal {
12 
13 BUILTIN(IsPromise) {
14  SealHandleScope scope(isolate);
15 
16  Handle<Object> object = args.atOrUndefined(isolate, 1);
17  return isolate->heap()->ToBoolean(object->IsJSPromise());
18 }
19 
20 } // namespace internal
21 } // namespace v8
Definition: libplatform.h:13